; ; Mule-2.1 の設定 ; ; ; ライブラリのロードパスを設定する。 (setq load-path '( "/home/takano/bin/mule" "/usr/local/lib/mule/lisp" "/usr/local/lib/mule/site-lisp" )) ; ;キーバインドの設定 ; ; DEL キーを有効にする仕掛け (load "term/keyswap" nil t nil) (if (eq window-system 'x) (progn (define-key function-key-map [delete] [4]) (put 'delete 'ascii-character 4) )) ; DEL に delete-char をマップする。 (global-set-key [del] 'delete-char) ; ヘルプ を C-x h にマップする。 (define-key ctl-x-map "h" 'help-command) ; 数を指定するキーを C-u から C-x C-u にマップし直す。 (define-key ctl-x-map "\C-u" 'universal-argument) ; undo を C-u にマップする。 (define-key global-map "\C-u" 'undo) ; 何行目に行くというやつを、C-x C-n にマップする。 (define-key ctl-x-map "\C-n" 'goto-line) ; Zapが嫌いなひとはコメントを外してください。 ;(global-set-key "\C-z" 'scroll-down) ; ROLL-UP/DOWNを逆にする NEC48 で有効;-) ;(global-set-key [prior] 'scroll-up) ;(global-set-key [next] 'scroll-down) ; QUAIL でキーバインドを正しくする。 ;(setq *quail-keyboard-translate-table* ; *quail-keyboard-translate-table-jis*) ; ;その他の mule の設定 ; ; Mew のオープニングデモを見ないようにする ;(setq mew-demo nil) ; マウスカーソルの bitmap と色を変える設定 ;(if (eq window-system 'x) (setq x-pointer-shape x-pointer-hand2) (set-mouse-color "red") ;) ; 時間の表示の設定 ;(setq display-time-day-and-date t) ;(defvar display-time-interval 60 ; "*Seconds between updates of time in the mode line.") ;(display-time) ; カーソルが何処にあるか表示する (line-number-mode 1) ; メニューバーの設定(未設定) ;(define-key menu-bar-file-menu [mh-rmail] '("Read Mail" . mh-rmail)) ; メニューバーの設定(コメントアウトすると表示する) (menu-bar-mode 0) ; スクロールバーの設定 ;(scroll-bar-mode -1) ;今開いているフレームだけスクロールバーを消す場合は以下をコメントアウト ;(toggle-scroll-bar -1) ; Garbage Collection の値を大きくする default :100000 (setq gc-cons-threshold 1000000) ; 送信したメイルの保存ファイルを設定する。 ;(setq mail-archive-file-name "~/Mail/outgoing") ; 矢印キーで1行移動する時に2行スクロールにする (setq scroll-step 2) ;バッファの最後で next-line を実行しても、新しい行が挿入されないようにする (setq next-line-add-newlines nil) ; C-k で1ラインそっくり消える (setq kill-whole-line t) ; マウスでテキストをつかんでスクロールさせる by isoyama@rd.nttdata.jp (global-set-key [mouse-3] 'mouse-drag-window-vertically) (defun mouse-drag-window-vertically (arg) (interactive "e") (let* ((position0 (car (cdr arg))) (position1 (car (cdr (cdr arg)))) (window0 (nth 0 position0)) (window1 (nth 0 position1)) (initial-window (selected-window)) row0 row1 lines ) (if (eq window0 window1) (progn (setq row0 (cdr (posn-col-row position0)) row1 (cdr (posn-col-row position1))) ; (message "%s->%s %s|%s" row0 row1 window0 window1) (unwind-protect (if row1 (progn (select-window window0) (setq lines (- row0 row1)) (scroll-up lines) ))) (select-window initial-window) ) ))) ; RMAILを使う人 (setq rmail-spool-directory "/var/mail/") (setq sendmail-program "/usr/sbin/sendmail") (setq manual-program "/usr/bin/man") ; news (define-service-coding-system "nntp" nil *junet*unix) (put 'set-goal-column 'disabled nil) ; hilit19.elの設定(mule のソースに色が付く) (if (eq window-system 'x) (load "hilit19.el") (setq hilit-mode-enable-list '(not text-mode emacs-lisp-mode sgml-mode c-mode c++-mode)) ) ; インクリメンタルサーチ中に ASCII 文字以外を入力する (load "isearch-ext.el") ; text mode では auto-fill-mode する。 (setq text-mode-hook '(lambda () (set-fill-column 68))) (setq text-mode-hook 'turn-on-auto-fill) ; mouse の設定変更 特殊パッチを当てている ;(setq mouse-yank-at-point t) ;(if (eq window-system 'x) ; (require 'mouse-patch) ) (if (eq window-system 'x) (load-file "/home/ytakano/bin/mule/mouse-patch.elc") ) ; ; canna の設定 ; (load "canna") (canna) ; XFERでcannaを起動する NEC48 で有効;-) ;(global-set-key [insert] 'overwrite-mode) (global-set-key [Kanji] 'canna-toggle-japanese-mode) ;(set-keyboard-config-system *junet*) ; canna で BS,INS,UP,DOWN,矢印等のキー設定をさしさわりのない ; ものにする fun@d2.comd.snes.nec.co.jp (define-key canna-mode-map [backspace] [?\C-h]) (define-key canna-mode-map [up] [?\C-p]) (define-key canna-mode-map [down] [?\C-n]) (define-key canna-mode-map [right] [?\C-f]) (define-key canna-mode-map [left] [?\C-b]) (define-key canna-mode-map [kanji] [? ]) (define-key canna-mode-map [muhenkan] [? ]) (define-key canna-mode-map [insert] [? ]) (define-key canna-mode-map [delete] [?\C-d]) (define-key canna-minibuffer-mode-map [backspace] [?\C-h]) (define-key canna-minibuffer-mode-map [up] [?\C-p]) (define-key canna-minibuffer-mode-map [down] [?\C-n]) (define-key canna-minibuffer-mode-map [right] [?\C-f]) (define-key canna-minibuffer-mode-map [left] [?\C-b]) (define-key canna-minibuffer-mode-map [kanji] [? ]) (define-key canna-minibuffer-mode-map [muhenkan] [? ]) (define-key canna-minibuffer-mode-map [insert] [? ]) (define-key canna-minibuffer-mode-map [delete] [?\C-d]) ; cannaでoverlayに対応 (setq canna-underline t) (setq canna-with-fences nil) (defvar canna:*overlay-alist* nil) (make-variable-buffer-local 'canna:*overlay-alist*) (defun attribute-on-region (face start end) (if (eq face 'inverse) (setq face 'modeline)) (let ((overlay (cdr-safe (assq face canna:*overlay-alist*)))) (cond ((null overlay) (setq overlay (make-overlay 1 1 nil t)) (setq canna:*overlay-alist* (cons (cons face overlay) canna:*overlay-alist*)))) (overlay-put overlay 'face face) (move-overlay overlay start end))) (defun attribute-off-region (face start end) (if (eq face 'inverse) (setq face 'modeline)) (let ((overlay (cdr-safe (assq face canna:*overlay-alist*)))) (if (overlayp overlay) (delete-overlay overlay)))) (provide 'attribute) ; ; select-signature の設定( mew/gnus に有効) ; (autoload 'select-signature "select-signature" "Select Signature" t) (defun mh-visit-inbox () (mh-visit-folder "+inbox" "all" (current-window-configuration)) ) ; ; Mew の設定 ; ; C-x m でmewを起動 (global-set-key "\C-xm" 'mew) (autoload 'mew "mew" nil t) (autoload 'mew-read "mew" nil t) (autoload 'mew-send "mew" nil t) ;メールのドメイン名の設定 (setq mew-mail-domain "???.co.jp") ; mime を動かす設定 (setq mew-prog-mime-encode "mimencode") (setq mew-prog-mime-decode "mimencode") ; * スプールが JIS(ISO-2022-JP のコード体系に沿っているコード) でない人の設定 (setq mew-mule-charset-spool *euc-japan*) ; Fcc: をつけない (setq mew-fcc nil) ;Reply-To: をつけない (setq mew-reply-to nil) ; Cc: にデェフォルト "takano" を付ける ;(setq mew-cc nil) (setq mew-cc "takano@???.co.jp") ; mh-e と近いキーバインドにする (setq mew-summary-mode-hook '(lambda () (define-key mew-summary-mode-map "\M-r" 'mew-summary-rescan) (define-key mew-summary-mode-map "s" 'mew-summary-send) (define-key mew-summary-mode-map "^" 'mew-summary-refile) (define-key mew-summary-mode-map "\M-f" 'mew-summary-goto-folder) (define-key mew-summary-mode-map "t" 'mew-summary-toggle-disp-msg) )) ; ; mew の細かい動作の設定 (setq mew-draft-mode-hook '(lambda () ; 書ける桁を 68 カラムとする。 (set-fill-column 68) ; C-c,C-y で引用する記事を本文のみとする ; (setq mh-yank-from-start-of-msg 'body) )) (defvar mew-signature-file-name "~/.signature" "*Name of file containing th ; (setq news-reply-mode-hook '(lambda () (set-fill-column 68) (setq gnus-yank-from-start-of-msg 'body) (define-key news-reply-mode-map "\C-c\C-s" 'ins-sig))) e user's signature. Inserted into message by \\\\[mew-insert-signature].") (defun mew-insert-signature () "Insert the file named by mh-signature-file-name at the current point." (interactive) (insert-file-contents mew-signature-file-name) (set-buffer-modified-p (buffer-modified-p)) ) ; ; GNUS 4.1用の設定 for sysd-all-cite ; ; NNTPSERVERの設定 (setq gnus-nntp-server "nntp.???.co.jp") (setq gnus-startup-file "~/.newsrc") (if (eq window-system 'x) ;; -nw のときはMetaMailは使えない (autoload 'gnus "metamail" "MetaMail" t) ;; metamail をロード ) (setq gnus-local-distributions '( "3web" "fj" "tnn")) ; Gnus で、記事を早く見える様にする仕掛け;-) (setq nntp-buggy-select nil) ; GNUS にポストする domain 名を記述 (setq gnus-local-domain "???.co.jp") (setq gnus-local-organization "Takano Yuji") (setq-default gnus-use-long-file-name t) ; host名をつけない (setq gnus-use-generic-from t) (setq gnus-default-article-saver 'gnus-summary-save-in-folder) (setq gnus-use-full-window nil) (setq gnus-author-copy "|/usr/local/lib/mh/rcvstore +News") (setq gnus-local-timezone "JST") (setq gnus-group-mode-hook '(lambda () (set-fill-column 68) (setq gnus-signature-file nil) (setq gnus-ins-signature-file "~/.signature") (define-key gnus-group-mode-map " " 'gnus-group-select-group) (define-key gnus-group-mode-map "s" 'gnus-group-post-news) (define-key gnus-group-mode-map "x" 'gnus-group-force-update) )) (setq gnus-summary-mode-hook '(lambda () (define-key gnus-summary-mode-map "s" 'gnus-summary-post-news) (define-key gnus-summary-mode-map "a" 'gnus-summary-followup) (define-key gnus-summary-mode-map "h" 'gnus-summary-toggle-header) (define-key gnus-summary-mode-map "t" 'gnus-summary-expand-window) (define-key gnus-summary-mode-map "." 'gnus-summary-next-page) )) ;(setq nntp-server-hook ; '(lambda () ; (make-local-variable 'kanji-fileio-code) ; (setq kanji-fileio-code 0) ; (load "gmt-to-jst" ) ;; GNUS GMT -> JST 時刻の変換 ; (load-library "fillesc2") ;; ; (load-library "jis-to-emacs-kanji") ;;日本語サブジェクトの設定 ; (load-library "nntp-ext-subject"))) ;; ; ; B News 2.11用の設定。 X-NSubjectを挿入する。 (defun insX-N () (interactive) (goto-char (point-min)) (search-forward "Subject:") (end-of-line) (insert "\n") (insert "X-Nsubject: ")) (global-set-key "\C-c\C-a" 'insX-N) (setq news-make-reply-yank-header 'news-make-reply-yank-jheader) (setq news-yank-original-quoting-indicator "|") (setq news-yank-original-default-indentation 1) ; GNUS で mh-e でリプライするための仕掛け (setq gnus-Startup-hook '(lambda () (autoload 'gnus-Subject-mail-reply-by-mh "gnus-mh") (autoload 'gnus-Subject-mail-other-window-by-mh "gnus-mh") (define-key gnus-Subject-mode-map "r" 'gnus-Subject-mail-reply-by-mh) (define-key gnus-Subject-mode-map "m" 'gnus-Subject-mail-other-window-by-mh))) ; set-msb-regionの定義 (defun set-msb-region (start end) "MSBのそげてしまったEUC漢字コードを元に戻す" ;最初は自分で書いたのを使っていたがこっちの方がいいので乗り換えた。 ;PFUの栄田さん、えらいっ!! (interactive "r") (save-excursion (goto-char start) (while (< (point) end) (save-excursion (setq beg (point)) (forward-char 2) (setq str (buffer-substring beg (point))) (aset str 0 (+ (aref str 0) 128)) (aset str 1 (+ (aref str 1) 128))) (delete-char 2) (insert str)))) ; ; Supercite の設定(リプライメールのヘッダを付ける機能) ; (setq mew-cite-hook 'sc-cite-original) (load "supercite" nil t) ; "sc-register ロードする。がしかしかんの目的があるのかは不明(^^; ;(load "sc-register" nil t) ;(setq sc-preferred-attribution-list ; '( "sc-consult" ; "sc-lastchoice" "x-attribution" "firstname" "initials" "lastname")) ; ; define citing function (defun sc-header-on-said-indented () "\"On ,\n\t said:\" unless: 1. the \"from\" field cannot be found, in which case nothing is inserted; 2. the \"date\" field is missing in which case only the from part is printed." (let ((sc-mumble "") (whofrom (sc-whofrom))) (if whofrom (insert sc-reference-tag-string (sc-hdr "On " (sc-mail-field "date") ",\n ") whofrom " said:\n")))) ;リプライメールのヘッダの加工 (defun sc-header-inarticle-writes-indented () "\"From: さん\" Treats \"from\" fields similar to `sc-header-on-said'." (let ((sc-mumble "") (whofrom (sc-hdr "From: " (sc-mail-field "from"))) ) (if whofrom (insert sc-reference-tag-string whofrom " さん\n")) )) ; ; set citation regexp (if (boundp 'MULE) (progn (setq sc-citation-root-regexp "\\([-._a-zA-Z0-9]\\|\\cj\\)*") (setq sc-citation-nonnested-root-regexp "\\([-._a-zA-Z0-9]\\|\\cj\\)+") ) (progn (setq sc-citation-root-regexp "\\([-._a-zA-Z0-9]\\|\\cc\\|\\cC\\|\\ch\\|\\cH\\|\\ck\\|\\cK\\|\\ca\\|\\cg\\|\\cr\\|\\cu\\)*") (setq sc-citation-nonnested-root-regexp "\\([-._a-zA-Z0-9]\\|\\cc\\|\\cC\\|\\ch\\|\\cH\\|\\ck\\|\\cK\\|\\ca\\|\\cg\\|\\cr\\|\\cu\\)+") )) (setq sc-citation-separator-regexp " ") ; ; set variables (setq sc-rewrite-header-list '( (sc-header-on-said-indented) (sc-header-inarticle-writes-indented) ; (sc-header-on-said) ; (sc-header-inarticle-writes) (sc-header-regarding-adds) (sc-header-attributed-writes) (sc-header-verbose) (sc-no-header) (sc-no-blank-line-or-header) ) sc-preferred-header-style 0 sc-nested-citation-p t sc-electric-references-p nil sc-citation-leader "" sc-citation-delimiter ">" sc-reference-tag-string "" sc-auto-fill-region-p nil sc-confirm-always-p nil sc-cite-blank-lines-p t sc-header-nuke-list '("via" "origin" "status" "received" "remailed" "cc" "sender" "replied" "organization" "keywords" "distribution" "xref" "references" "expires" "approved" "summary" "precedence" "subject" "newsgroup[s]?" "\\(\\(followup\\|apparently\\|errors\\|\\(in-\\)?reply\\)-\\)?to" "x-[a-z0-9-]+" "[a-z-]*message-id" "\\(summary-\\)?line[s]" "\\(\\(return\\|reply\\)-\\)?path" "\\(posted-\\)?date" "\\(mail-\\)?from" "mime-version" "content-type" "content-transfer-encoding" "content-id" )) ; supercite のロード (autoload 'sc-cite-original "supercite" "Supercite 3.1" t) (autoload 'sc-submit-bug-report "supercite" "Supercite 3.1" t) (add-hook 'mail-citation-hook 'sc-cite-original) (add-hook 'mh-yank-hooks 'sc-cite-original) (setq news-reply-header-hook nil) (setq sc-auto-fill-region-p nil) (setq sc-electric-references-p nil) (setq sc-preferred-header-style 1) (setq sc-citation-leader "") ; ; gg-e.el(for Mule 2.0) (setq latex-mode-hook '(lambda () (load-library "gg-e") (setq latex-run-command "latex") (setq tex-run-command "latex") (setq gg-command "gg -pt") (setq gg-dvi-preview-command "texx -dpi 240") (setq gg-dvi2ps-command "dvi2ps ") (setq gg-ghostview-command "ghostview ") (setq gg-gs-command "gs ") (setq gg-xdvi-command "xdvi ") (setq gg-gg-command "gg -pt ") (setq gg-dvi-print-command "lpr -d") (setq gg-lpr-print-command "lpr") (setq gg-show-queue-command "lpq") ; (setq TeX-directory "./") ; work directory ; (setq TeX-zap-file "#textemp" ) (define-key tex-mode-map "\C-c\C-b" 'gg-buffer) (define-key tex-mode-map "\C-c\C-d" 'gg-ps) (define-key tex-mode-map "\C-c\C-t" 'gg-preview) (define-key tex-mode-map "\C-c\C-v" 'gg-ghostview) (define-key tex-mode-map "\C-c\C-x" 'gg-xdvi) (define-key tex-mode-map "\C-c\C-p" 'gg-lpr) (define-key tex-mode-map "\C-c\C-s" 'gg-gs) (define-key tex-mode-map "\C-c\C-m" 'gg-multi) (auto-fill-mode 0)) ) ; ; ★SAME GAME の設定 (autoload 'same "/home/ytakano/bin/same/same.el" "SAME GAME" t) (put 'eval-expression 'disabled nil) ;