>>>> In <86hfc9yz85.fsf(a)xa12.heimat.gr.jp>
>>>> NAKAJI Hiroyuki <nakaji(a)tutrp.tut.ac.jp> wrote:
中治> ここはひとつ、しばらく様子を見た方がよいのでしょうか。(^_^;;
僕の ~/.emacs がおかしいのでしょうか?
o xemacs -q で起動後、.emacs をロード →エラーにならない
o xemacs -debug-init で起動 →次のようなエラーになる
core dump はしなくなりましたが、どうしてこのような動きをするのか、皆目
見当がつきません。
長くなって恐縮ですが、.emacs と、そこからロードされる
~/.xemacs/init.el をつけます。
;;;; -*- mode: emacs-lisp; coding: iso-2022-jp-unix; -*-
;;;; .emacs of NAKAJI Hiroyuki <nakaji(a)tutrp.tut.ac.jp>
;;;; common settings
;;;;
(setq load-path (cons (expand-file-name "~/elisp")
load-path))
(set-variable 'debug-on-error t)
;;; do not display startup messages
(setq inhibit-startup-message t)
;;;; set auto-fill-mode with Text-mode
(setq text-mode-hook
'(lambda () (auto-fill-mode 1)))
;;;; ?
(put 'downcase-region 'disabled nil)
;;;; Switch init file
(cond
((string-match "XEmacs" emacs-version)
(load-file "~/.xemacs/init.el"))
((string-match "20" emacs-version)
(load-file "~/.emacs20"))
((string-match "19" emacs-version)
(load-file "~/.mule"))
(t
(load-file "~/.nemacs"))
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; common settings for all Emacsen
;;;; EGG
(setq wnn-host-name "nakaji.tutrp.tut.ac.jp")
;;;; mew
(require 'my-mew-setup)
;;;; SuperCite-3.1
(add-hook 'mail-citation-hook 'sc-cite-original)
;;; never claim on header
(setq sc-mail-warn-if-non-rfc822-p nil)
;;; untabify
(setq sc-citation-leader "")
;;; Fill each paragraph after it has been cited
(setq sc-auto-fill-region-p nil)
;;;; SC end
;;;; prom-mew
(if (file-executable-p "/usr/local/bin/lockfile")
(progn
(autoload 'prom-mew "prom-mew" "mew for using procmail" t)
(setq proc-log-list (list "~/Mail/procmail.log"))
;; procmail が出力するログファイル(複数指定可)
;; ~/.procmail の LOGFILE で指定したもの。
(setq proc-keep-log "~/Mail/listlog") ;; ログの保存用ファイル
(setq proc-keep-log nil) ;; ログを保存しない
(setq proc-lock-file "~/.lockmail") ;; ロックファイル(下記参照)
;; ~/.procmail の LOCKFILE で指定したもの。
(setq prom-prog-lockfile "/usr/local/bin/lockfile")
(unless (string-match "XEmacs" emacs-version)
(substitute-key-definition 'mew 'prom-mew menu-bar-tools-menu))
))
;;;; prom-mew end
;;;; python-mode
(setq auto-mode-alist
(cons '("\\.py$" . python-mode) auto-mode-alist))
(setq interpreter-mode-alist
(cons '("python" . python-mode)
interpreter-mode-alist))
(autoload 'python-mode "python-mode" "Python editing mode." t)
;;;; xrdb-mode
;(autoload 'xrdb-mode "xrdb-mode" "Mode for editing X resource
files" t)
;(setq auto-mode-alist
; (append '(("\\.Xdefaults$" . xrdb-mode)
; ("\\.Xenvironment$" . xrdb-mode)
; ("\\.Xresources$" . xrdb-mode)
; ("*.\\.ad$" . xrdb-mode)
; )
; auto-mode-alist))
;;;; switch LP to LPR
(setq lpr-command "lpr")
(setq lpr-switches nil)
;;;; octave, MATLAB compatible free software
(autoload 'octave-mode "octave-mod" nil t)
(setq auto-mode-alist
(cons '("\\.m$" . octave-mode) auto-mode-alist))
(add-hook 'octave-mode-hook
(lambda ()
(abbrev-mode 1)
(auto-fill-mode 1)
(if (eq window-system 'x)
(font-lock-mode 1))))
;;;;
(defun update-html-files ()
(interactive)
(replace-string "1995-1998" "1995-1999")
(replace-string "nakaji(a)zeisei.dpri.kyoto-u.ac.jp"
"nakaji(a)tutrp.tut.ac.jp"))
;;;; signature.el で signature を使い分ける
(require 'signature)
(setq signature-file-name "~/signature/signature")
(setq message-signature nil)
(setq signature-insert-at-eof t)
(setq signature-delete-blank-lines-at-eof t)
(setq signature-use-bbdb t)
(setq signature-file-alist
`((("Newsgroups" . "^tut\\.") .
"~/signature/signature-tut")
(("Newsgroups" . "") . "~/signature/signature")
(("To" . "@.*dpri.kyoto-u.ac.jp")
. "~/signature/signature-official")
(("To" . "@.*tutrp\\.tut\\.ac\\.jp") .
"~/signature/signature-tut")
(("To" . "") . "~/signature/signature")
))
(set-alist 'mime-setup-signature-key-alist 'message-mode "\C-c\C-w")
;;;; customization of x-face
;;; 中治の顔
(setq x-face-default-xbm-file "nakaji.xbm")
;;; それだけを使う
(setq x-face-insert-interactive nil)
;;; Gnus のサマリモードでのキーバインド
(add-hook 'gnus-summary-mode-hook
(function
(lambda ()
(define-key (current-local-map) "\C-x4s" 'x-face-save)
(define-key (current-local-map) "\C-x4v" 'x-face-view)
(define-key (current-local-map) "\C-x4a" 'x-face-ascii-view)
)))
; Gnus (v5.4 以上) では、こうすると x-face-default-xbm-file で指定した
; xbm ファイルの内容がエンコードされて挿入されます。
; また、変数 x-face-insert-interactive を t にしておくと毎回挿入するファ
; イル名を尋ねるようになります。
; また、以下ような hook を設定しておくと、送信メッセージを書き始めると
; きに X-Face フィールドを付加するかどうかを (y or n) で選択できるよう
; になります。(これは mail-setup-hook に設定する例です。)
(add-hook 'gnus-message-setup-hook
(function
(lambda ()
(and (y-or-n-p "X-Face ヘッダを付けますか? ")
(call-interactively 'x-face-insert)
))))
; v1.2.8 からバージョン 19 以上の Emacsen でメニューが使えるようになっ
; ています。メニューを有効にするには .emacs に次のように書いて下さい。
(autoload 'x-face-define-menu "x-face" "Define menu." t)
(mapcar
(function (lambda (hook) (add-hook hook 'x-face-define-menu)))
'(gnus-message-setup-hook gnus-summary-mode-hook
wl-summary-mode-hook wl-mail-setup-hook
cmail-summary-mode-hook
mail-setup-hook
mh-folder-mode-hook mh-letter-mode-hook
rmail-mode-hook vm-summary-mode-hook
mew-draft-mode-hook mew-summary-mode-hook mew-virtual-mode-hook))
; メニューから使えるコマンド x-face-menu-insert x-face-menu-encode を
; 手動で M-x したり hook などで使う場合には、
(autoload 'x-face-menu-insert "x-face" "Insert X-Face with menu."
t)
(autoload 'x-face-menu-encode "x-face"
"Generate X-Face string(s) from xbm file with menu." t)
;;;; namazu
(autoload 'namazu "namazu" nil t)
(setq browse-url-browser-function 'browse-url-netscape)
(setq namazu-always-query-index-directory nil)
(setq namazu-default-dir "/home/nakaji/home2/namazu/CADENZA
/home/nakaji/home2/namazu/Cyrus /home/nakaji/home2/namazu/Elips
/home/nakaji/home2/namazu/Heimat /home/nakaji/home2/namazu/Heimat-ML
/home/nakaji/home2/namazu/HeimatH2-ML /home/nakaji/home2/namazu/Mew-dist
/home/nakaji/home2/namazu/apel-ja /home/nakaji/home2/namazu/ding
/home/nakaji/home2/namazu/dpri /home/nakaji/home2/namazu/emacs-mime-ja
/home/nakaji/home2/namazu/emcws-bug /home/nakaji/home2/namazu/freebsd
/home/nakaji/home2/namazu/freebsd-beginners-jp /home/nakaji/home2/namazu/freebsd-current
/home/nakaji/home2/namazu/freebsd-jp /home/nakaji/home2/namazu/freebsd98-testers
/home/nakaji/home2/namazu/from /home/nakaji/home2/namazu/hanachan-ml
/home/nakaji/home2/namazu/inbox /home/nakaji/home2/namazu/kakenhi-macro
/home/nakaji/home2/namazu/linuxppc-jp /home/nakaji/home2/namazu/ml
/home/nakaji/home2/namazu/net-admin /home/nakaji/home2/namazu/samba-jp
/home/nakaji/home2/namazu/semi-gnus-ml /home/nakaji/home2/namazu/tamag!
otchy /home/nakaji/home2/namazu/tm-ja /home/nakaji/home2/namazu/tut
/home/nakaji/home2/namazu/xemacs-ja")
;;;;
; (if window-system
; (progn
; (autoload 'smiley-buffer "smiley-mule" nil t)
; (autoload 'smiley-encode-buffer "smiley-mule" nil t)
; (add-hook 'mime-display-text/plain-hook 'smiley-buffer)
; (add-hook 'mime-edit-translate-hook 'smiley-encode-buffer)
; ))
;;;; Perl-mode
(setq auto-mode-alist (cons '("\\.[pP][Llm]$" . perl-mode)
auto-mode-alist))
(autoload 'perl-mode "cperl-mode" "alternate mode for editing Perl
programs" t)
(setq cperl-hairy t)
(setq cperl-info-page "perl")
;;;; end of Perl
;;;; custom
(custom-set-variables
'(browse-url-browser-function (quote browse-url-netscape))
'(gnus-header-face-alist (quote (("From" nil gnus-header-from-face)
("Subject" nil gnus-header-subject-face) ("Newsgroups:.*" nil
gnus-header-newsgroups-face) ("To:.*" nil gnus-header-newsgroups-face)
("" gnus-header-name-face gnus-header-content-face))))
'(gnus-ignored-headers (quote ("^Received:" "^Return-Path:"
"^Precedence:")))
'(gnus-visible-headers nil)
'(hm--html-user-config-file "~/.hm--html-configuration.el")
'(browse-url-new-window-p t)
'(x-face-add-x-face-version-header t)
'(smtp-default-server "localhost")
'(gnus-sorted-header-list (quote ("^From:" "^Subject:"
"^Summary:" "^Keywords:" "^Newsgroups:"
"^Followup-To:" "^To:" "^Cc:" "^Date:"
"^Organization:" "^References:" "^In-Reply-To:"
"^Message-ID:" "^Mime-Version:" "^Content-Type:"
"^[^X].*:" "^X.*:")))
'(hm--html-log-date-format "%d-%b-%Y %R")
'(hm--html-automatic-update-modified-line t)
'(mime-edit-split-message nil)
'(x-face-mule-force-save-cache-file t)
'(hm--html-html-doctype-version "-//W3C//DTD HTML 3.2 Final//EN")
'(nnmail-keep-last-article nil)
'(ps-multibyte-buffer (quote non-latin-printer) t)
'(pgg-default-scheme (quote pgp5))
'(hm--html-automatic-create-modified-line t)
'(toolbar-mail-reader (quote gnus))
'(message-send-mail-function (quote message-send-mail-with-smtp))
'(auto-save-list-file-prefix "~/.autosave/saves-")
'(hm--html-meta-name-alist (quote (("Expires") ("Keys")
("Author") ("Content-Type"))))
'(user-mail-address "nakaji(a)tutrp.tut.ac.jp")
'(hm--html-site-config-file nil)
'(hm--html-title-date-format "%d-%b-%Y %R")
'(custom-file "~/.emacs")
'(hm--html-username "NAKAJI Hiroyuki")
'(mu-cite-prefix-format (quote (bbdb-prefix-register-verbose "> ")))
'(user-full-name "NAKAJI Hiroyuki")
'(message-user-organization "Dept. of Archi. and Civil Eng., Toyohashi Univ. of
Tech."))
(custom-set-faces
'(gnus-header-subject-face ((((class color) (background light)) (:foreground
"red4" :bold t))))
'(gnus-header-newsgroups-face ((((class color) (background light)) (:foreground
"MidnightBlue" :bold t :italic t))))
'(gnus-header-from-face ((((class color) (background light)) (:foreground
"red3" :bold t)))))
;;;;; -*- coding: iso-2022-7bit-unix -*-
;;;;; .xemacs file included from .emacs.
;;;;;
(add-to-list 'load-path "~/elisp/xemacs")
(set-variable 'debug-on-error t)
(add-hook 'emacs-lisp-mode-hook
'(lambda () (font-lock-mode 1)))
;;;; use SEMI but don't show inline HTML
(setq mime-setup-enable-inline-html nil)
(require 'semi-setup)
;;;; use Japanese
;(setup-japanese-environment)
;;; and Wnn6
(setq default-input-method "japanese-egg-wnn")
(setq wnn-host-name "localhost")
(setq egg-startup-file "~/.xemacs/eggrc-wnn")
;;;; w3-mode
(setq w3-default-homepage "http://www.tut.ac.jp/")
;;;; AUC TeX
(require 'tex-site)
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq-default TeX-master nil)
(require 'bib-cite)
(setq auto-mode-alist (cons '("\\.tex$" . japanese-latex-mode)
auto-mode-alist))
(autoload 'japanese-latex-mode "tex-jp" "Japanese LaTeX mode" t)
(setq LaTeX-mode-hook
'(lambda () (auto-fill-mode 1)
(font-lock-fontify-buffer)
(set-buffer-file-coding-system 'euc-jp-unix)
(setq TeX-japanese-process-input-coding-system 'euc-jp-unix)
(setq TeX-japanese-process-output-coding-system 'euc-jp-unix)))
(setq japanese-LaTeX-default-style "jarticle")
;;;; customize
;(setq custom-file "~/.xemacs/custom.el")
;;;; FONT のバランス
(when (and (featurep 'mule)
(fboundp 'console-on-window-system-p)
(console-on-window-system-p))
(set-face-font 'default "-*-fixed-medium-r-normal--16-*"))
;;;;
(require 'vc)
;;--------------------------------------------------------------------
;; Lines enabling gnuplot-mode
;; move the files gnuplot.el to someplace in your lisp load-path or
;; use a line like
;; (setq load-path (append (list "/path/to/gnuplot") load-path))
;; these lines enable the use of gnuplot mode
(autoload 'gnuplot-mode "gnuplot" "gnuplot major mode" t)
(autoload 'gnuplot-make-buffer "gnuplot" "open a buffer in gnuplot
mode" t)
;; this line automatically causes all files with the .gp extension to
;; be loaded into gnuplot mode
(setq auto-mode-alist (append '(("\\.gp$" . gnuplot-mode))
auto-mode-alist))
;; This line binds the function-9 key so that it opens a buffer into
;; gnuplot mode
(global-set-key [(f9)] 'gnuplot-make-buffer)
;; end of line for gnuplot-mode
;;--------------------------------------------------------------------
;;;; use BBDB in Semi-gnus
(require 'bbdb)
(require 'gnus-bbdb) ;;;;←ここでエラーになっているらしい
(bbdb-initialize 'sc) ;; 'gnus / 'Gnus ははずしてください。
(add-hook 'gnus-startup-hook 'gnus-bbdb-insinuate)
(add-hook 'message-mode-hook 'gnus-bbdb-insinuate-message)
;;; BBDB other settings
(setq signature-use-bbdb t)
;; 自分のメイルアドレス。
;;;; これを設定しておくと、 From が自分のものについては To を登録
;;;; 対象にするようになります。 ( メイリング・リストなどで便利です。 )
;;;; ただし、Semi-gnus で有効にするためには、パッチが必要です。
(setq bbdb-user-mail-names
"nakaji@tutrp\\.tut\\.ac\\.jp\\|hinakaji(a)gold\\.ocn\\.ne\\.jp")
;; 標準以外に収集するヘッダー・フィールド
;;;; 今のところ、参加しているメイリング・リストだけです。
;;;; 誰かが BBDB で X-Face を見られるようにしてくれないかな... ^^;;;
(setq bbdb-auto-notes-alist '(("X-ML-Name" (".*" ML 0))))
;; 登録済の人の、標準以外に収集するヘッダー・フィールドは自動的に
;; 収集するようになります。
(add-hook 'bbdb-notice-hook 'bbdb-auto-notes-hook)
;; Gnus のサマリー・バッファーで、登録してある人の From の前に “+”
;; が表示されるようになります。
(setq gnus-summary-line-format "%U%R%z%I%(%[%4L:%ub %-20,20n%]%) %s\n")
;; GNUS will NOT automatically create new bbdb records
;(add-hook 'gnus-select-group-hook
; '(lambda ()
; (if (eq (car (gnus-find-method-for-group (gnus-group-group-name))) 'nnml)
; (setq bbdb/news-auto-create-p t))))
;(setq bbdb/news-auto-create-p nil)
;;; FLIM では quote された eword encoded word は decode されませんが、
;;; それを強制的に decode したい場合には、次の設定を加えてください。
(setq gnus-bbdb/decode-field-body-function
(function
(lambda (field-body field-name)
(eword-decode-string field-body))))
;;; Don't display a continuously-updating bbdb window
(setq bbdb-use-pop-up nil)
;;;; show what line I'm now editing
(line-number-mode 1)
;;;; use mu-cite for citation
(autoload 'mu-cite-original "mu-cite" nil t)
;;; for all but message-mode
(add-hook 'mail-citation-hook 'mu-cite-original)
;;; for message-mode only
(setq message-cite-function (function mu-cite-original))
;;; for Mew
(add-hook 'mew-cite-hook 'mu-cite-original)
;;; mu-cite uses bbdb
;(add-hook 'mu-cite-load-hook
; (function
; (lambda ()
; (require 'mu-bbdb)
; )))
;;;; c-sig
;(autoload 'add-signature "c-sig" "c-sig" t)
;(autoload 'delete-signature "c-sig" "c-sig" t)
;(autoload 'insert-signature-eref "c-sig" "c-sig" t)
;(autoload 'insert-signature-automatically "c-sig" "c-sig" t)
;(autoload 'insert-signature-randomly "c-sig" "c-sig" t)
;(setq message-signature nil)
;;(set-alist 'insert-signature-eref 'message-mode "\C-c\C-w")
;(add-hook 'message-mode-hook
; '(lambda ()
; (define-key message-mode-map "\C-c\C-w"
; 'insert-signature-eref)))
;;;; hm--html-mode
(autoload 'hm--html-mode "hm--html-mode" "HTML major mode." t)
(autoload 'hm--html-minor-mode "hm--html-mode" "HTML minor mode."
t)
(or (assoc "\\.html$" auto-mode-alist)
(setq auto-mode-alist (cons '("\\.html$" . hm--html-mode)
auto-mode-alist)))
(setq auto-mode-alist (cons '("\\.htm$" . hm--html-mode)
auto-mode-alist))
(autoload 'tmpl-expand-templates-in-buffer "tmpl-minor-mode"
"Expand all templates in the current buffer." t)
(autoload 'tmpl-expand-templates-in-region "tmpl-minor-mode"
"Expands the templates in the region from BEGIN to END.
If BEGIN and END are nil, then the current region is used."
t)
(autoload 'tmpl-insert-template-file-from-fixed-dirs
"tmpl-minor-mode"
"Inserts a template FILE and expands it, if
`tmpl-automatic-expand' is t.
This command tries to read the template file from a list of
predefined directories (look at `tmpl-template-dir-list') and it
filters the contents of these directories with the regular
expression `tmpl-filter-regexp' (look also at this variable).
The command uses a history variable, which could be changed with the
variable `tmpl-history-variable-name'.
The user of the command is able to change interactively to another
directory by entering at first the string \"Change the directory\".
This may be too difficult for the user. Therefore another command
called `tmpl-insert-template-file' exist, which doesn't use fixed
directories and filters."
t)
(autoload 'tmpl-insert-template-file "tmpl-minor-mode"
"Inserts a template FILE and expand it,
if `tmpl-automatic-expand' is t.
Look also at `tmpl-template-dir-list', to specify a default template
directory. You should also take a look at
`tmpl-insert-template-file-from-fixed-dirs', which has additional
advantages (and disadvantages :-).
ATTENTION: The interface of this function has changed. The old
function had the argument list
(&optional TEMPLATE-DIR AUTOMATIC-EXPAND).
The variables `tmpl-template-dir-list' and `tmpl-automatic-expand'
must now be used instead of the args TEMPLATE-DIR and
AUTOMATIC-EXPAND."
t)
(autoload 'html-view-start-mosaic "html-view" "Start Xmosaic." t)
(autoload 'html-view-view-buffer
"html-view"
"View the current buffer in Xmosaic."
t)
(autoload 'html-view-view-file
"html-view"
"View a file in Xmosaic."
t)
(autoload 'html-view-goto-url
"html-view"
"Goto url in Xmosaic."
t)
(autoload 'html-view-get-display
"html-view"
"Get the display for Xmosaic (i.e. hostxy:0.0)."
t)
;;;; filladapt
(require 'filladapt)
(add-hook 'message-mode-hook
'(lambda ()
(font-lock-mode 1)
(filladapt-mode 1)))
;;;; x-face
(autoload 'x-face-encode "x-face"
"Generate X-Face string(s) from xbm file." t)
(autoload 'x-face-insert "x-face"
"Insert X-Face fields." t)
(autoload 'x-face-save "x-face"
"Save X-Face fields to files." t)
(autoload 'x-face-view "x-face"
"View X-Face fields." t)
(autoload 'x-face-ascii-view "x-face"
"View X-Face fields as ascii pictures." t)
;;; only for XEmacs
(autoload 'x-face-xmas-display-x-face "x-face"
"Display X-Face fields as XEmacs-glyph." t)
(autoload 'x-face-xmas-force-display-x-face "x-face"
"Display X-Face fields compulsorily as XEmacs glyph." t)
(autoload 'x-face-xmas-remove-x-face-glyph "x-face"
"Remove X-Face images and some text-properties." t)
;; 新規メッセージ作成時に顔を付ける
;(add-hook 'gnus-message-setup-hook 'x-face-insert)
;; メニューを使う
(autoload 'x-face-define-menu "x-face" "Define menu." t)
(add-hook 'gnus-summary-mode-hook 'x-face-define-menu)
(add-hook 'gnus-message-setup-hook 'x-face-define-menu)
(autoload 'x-face-menu-insert "x-face" "Insert X-Face with menu."
t)
(autoload 'x-face-menu-encode "x-face"
"Generate X-Face string(s) from xbm file with menu." t)
;; メールやニュースを読むときのインライン表示
; Mew 1.93 以降で使う場合。
(autoload 'x-face-xmas-mew-display-x-face "x-face" nil t)
(setq mew-use-highlight-x-face-function 'x-face-xmas-mew-display-x-face)
;;;; ChangeLog を綺麗に書くための道具
(eval-after-load "add-log"
'(progn
(defface _change-log-garbage-face-1
'((t (:foreground nil :background "Red")))
nil)
(defface _change-log-garbage-face-2
'((t (:foreground nil :background "Orange")))
nil)
(defface _change-log-garbage-face-3
'((t (:foreground nil :background "Yellow")))
nil)
(setq change-log-font-lock-keywords
(append change-log-font-lock-keywords
'(("^\\( +\\)\\(\t\\)"
(1 '_change-log-garbage-face-1)
(2 '_change-log-garbage-face-2))
("[\t ]+$" 0 '_change-log-garbage-face-1)
("^ +" 0 '_change-log-garbage-face-3)
)))))
(or (featurep 'xemacs)
(add-hook 'change-log-mode-hook 'turn-on-font-lock)
)
;;;; in default custom-file is not loaded
;(load custom-file)
;;;; auto-save
(setq auto-save-list-file-prefix "~/.autosave/saves-")
;;;; Don't show gutter
(set-specifier default-gutter-visible-p nil)
;;;; progress gauge display without native widgets
(setq progress-display-use-echo-area t)
--
NAKAJI Hiroyuki (中治 弘行)