;; ;; 環境変数の設定 ;; (setenv "LC_ALL" "C") ;; ;; 日本語がらみの設定 ;; (set-language-environment "japanese") (setq default-buffer-file-coding-system 'euc-jp-unix) (set-default-coding-systems 'euc-jp-unix) (set-buffer-file-coding-system 'euc-jp-unix) (set-keyboard-coding-system 'euc-jp-unix) (set-terminal-coding-system 'euc-jp-unix) (setq transient-mark-mode t) (setq next-line-add-newlines nil) ;;------------------------------------------------------------ ;; ;; 削除キーの設定 ;; (global-set-key [backspace] 'backward-delete-char) (global-set-key [delete] 'delete-char) ;;------------------------------------------------------------ ;; ;; canna, tamago関係の設定 ;; (setq canna-hostname '("localhost")) (setq default-input-method "japanese-egg-canna") (global-unset-key "\C-\\") (global-set-key "\C-o" 'toggle-input-method) ;;------------------------------------------------------------ ;; ;; 全般的な設定 ;; (setq initial-major-mode 'text-mode) (setq default-major-mode 'text-mode) (setq text-mode-hook '(lambda () (auto-fill-mode 1))) (setq fill-column 60) (setq tab-width 4) (setq indent-tabs-mode nil) (setq c-argdecl-indent 4) (setq c-indent-level 4) (setq c-label-offset -2) (setq-default truncate-lines t) (setq auto-save-default nil) (setq make-backup-files nil) (defvar special-key-map1 (make-keymap) "for ESC-[") (fset 'Special-Key-Map1 special-key-map1) (global-set-key "\M-[" 'Special-Key-Map1) (global-set-key "\M-[A" 'previous-line) (global-set-key "\M-[B" 'next-line) (global-set-key "\M-[C" 'forward-char) (global-set-key "\M-[D" 'backward-char) (global-set-key "\M-OA" 'previous-line) (global-set-key "\M-OB" 'next-line) (global-set-key "\M-OC" 'forward-char) (global-set-key "\M-OD" 'backward-char) (global-set-key "\M-[2~" 'open-line) (global-set-key "\M-[5~" 'scroll-down) (global-set-key "\M-[6~" 'scroll-up) (defvar special-key-map2 (make-keymap) "for ESC C-r") (fset 'Special-Key-Map2 special-key-map2) (global-set-key "\M-\C-r" 'Special-Key-Map2) (global-set-key "\M-\C-r\C-w" 'kill-rectangle) (global-set-key "\M-\C-r\C-y" 'yank-rectangle) (global-set-key "\M-\C-r\C-o" 'open-rectangle) (global-set-key "\M-\C-r\C-c" 'clear-rectangle) (global-set-key "\M-?" 'help-for-help) (global-set-key "\M- " 'set-mark-command) (global-set-key "\M-g" 'goto-line) (global-set-key "\C-x%" 'replace-string) (global-set-key "\C-x\\" 'shrink-window) (global-set-key "\C-h" 'backward-delete-char) (put 'eval-expression 'disabled nil) (put 'narrow-to-page 'disabled nil) ;;------------------------------------------------------------ ;; ;; emacs-w3m ;; (autoload 'w3m "w3m" "Interface for w3m on Emacs." t) ;; ;; 付属プログラムを使用するには,追加の設定が必要な場合があります.詳 ;; 細については,個々の付属プログラムのソースファイルの先頭に記載され ;; ているコメントを参照してください.良く分からない場合は,とりあえず, ;; 以下の設定を ~/.emacs に追加しておいてください. ;; (autoload 'w3m-find-file "w3m" "w3m interface function for local file." t) (autoload 'w3m-search "w3m-search" "Search QUERY using SEARCH-ENGINE." t) (autoload 'w3m-weather "w3m-weather" "Display weather report." t) (autoload 'w3m-antenna "w3m-antenna" "Report chenge of WEB sites." t) (autoload 'w3m-namazu "w3m-namazu" "Search files with Namazu." t) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;------------------------------------------------------------ ;; ;; mew-2.3(MIME対応メールハンドラ)関係の設定 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Site configuration ;;; (autoload 'mew "mew" nil t) (autoload 'mew-send "mew" nil t) (setq mew-name "Masahiko Ito") ;; (user-full-name) (setq mew-from-list '("m-ito@mbox.kyoto-inet.or.jp" "m-ito@myh.no-ip.org" "pde02650@nifty.com")) (setq mew-mail-domain-list '("mbox.kyoto-inet.or.jp" "myh.no-ip.org" "nifty.com")) ;;(setq mew-user "m-ito") ;; (user-login-name) ;;(setq mew-mail-domain "mbox.kyoto-inet.or.jp") ;;(setq mew-pop-user "m-ito") ;; (user-login-name) ;;(setq mew-pop-server "dd.iij4u.or.jp") ;; if not localhost ;;(setq mew-smtp-server "dd.iij4u.or.jp") ;; if not localhost ;;(setq mew-icon-directory "/usr/local/lib/emacs/etc/Mew/") ;; if using XEmacs/Emacs 21 ;; See also mew-config-alist for advanced use ; ;; To use local mailbox "mbox" or "maildir" instead of POP (setq mew-mailbox-type 'mbox) (setq mew-mbox-command "incm") (setq mew-mbox-command-arg "-d /var/spool/mail/m-ito") ;; If /path/to/mbox is a file, it means "mbox". ;; If /path/to/mbox is a directory, it means "maildir". ; ;; Optional setup (Read Mail menu for Emacs 21): ;;(if (boundp 'read-mail-command) ;; (setq read-mail-command 'mew)) ; ;; Optional setup (e.g. C-xm for sending a message): (autoload 'mew-user-agent-compose "mew" nil t) (if (boundp 'mail-user-agent) (setq mail-user-agent 'mew-user-agent)) (if (fboundp 'define-mail-user-agent) (define-mail-user-agent 'mew-user-agent 'mew-user-agent-compose 'mew-draft-send-message 'mew-draft-kill 'mew-send-hook)) (setq mew-prog-pgp2 "pgp") (setq mew-prog-pgp5 "pgp") (setq mew-prog-pgp6 "pgp") (setq mew-prog-gpg "gpg") ;(setq mew-prog-pgp mew-prog-pgp5) (setq mew-prog-pgp mew-prog-gpg) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Window tips ;;; ;; If you use XEmacs and your video chip provides only limited ;; color map(e.g. 256), put the following line to avoid exhaustion ;; of colors. ;(setq mew-demo-picture nil) (cond ((featurep 'xemacs) ; (setq-default buffer-file-coding-system 'iso-2022-jp) ; (setq keyboard-coding-system 'iso-2022-jp) ; (setq terminal-coding-system 'iso-2022-jp) (add-menu-item '("Apps") "Read Mail (Mew)" 'mew t "Read Mail (VM)...") (add-menu-item '("Apps") "Send Mail (Mew)" 'mew-send t "Read Mail (VM)...") (delete-menu-item '("Apps" "Read Mail (VM)...")) (delete-menu-item '("Apps" "Read Mail (MH)...")) (delete-menu-item '("Apps" "Send mail...")) (setq toolbar-mail-reader 'Mew) (setq toolbar-mail-commands-alist (cons '(Mew . mew) toolbar-mail-commands-alist))) ((>= emacs-major-version 21) ; (set-language-environment "Japanese") ) ((>= emacs-major-version 20) ; (setq standard-fontset-spec14 ; "-*-fixed-medium-r-normal-*-14-*-*-*-*-*-fontset-standard") ; (create-fontset-from-fontset-spec standard-fontset-spec14 nil 'noerror) ; (setq default-frame-alist ; (cons (cons 'font standard-fontset-spec14) default-frame-alist))) (set-face-font 'bold '(bold) t) (set-face-font 'italic '(italic) t) (set-face-font 'bold-italic '(bold italic) t) ; (set-language-environment "Japanese") ) (t ;; Mule 2.3 or Emacs 19 )) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Citation tip ;;; ;;; ;;; From: Kazu-kun ;;; Subject: Hello World ;;; Date: Thu, 08 Dec 1994 11:44:08 +0900 ;;; Message-Id: <199509291309.WAA21663@decpc07.aist-nara.ac.jp> ;;; ;;; Kazu-kun> The quick brown fox jumped over the very lazy dog. ;;; (setq mew-cite-fields '("From:" "Subject:" "Date:" "Message-ID:")) (setq mew-cite-format "From: %s\nSubject: %s\nDate: %s\nMessage-ID: %s\n\n") (setq mew-cite-prefix-function 'mew-cite-prefix-username) ;(setq mew-addrbook-for-cite-label 'nickname) ;(setq mew-addrbook-for-cite-prefix 'nickname) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Pick macro ;;; ;(mew-pick-define-macro "tocc=#" "to=#|cc=#") ;(mew-pick-define-macro "mew" "tocc=mew"))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; C-u ? and M-n ;;; ;; To whose who want to search Japanese key in the entire of messages. ;; ftp://ftp.iij.ad.jp/pub/IIJ/dist/utashiro/perl/mg-xxx ;; ftp://ftp.iij.ad.jp/pub/IIJ/dist/utashiro/perl/jcode-xxx.pl ;; ;; (setq mew-prog-grep "mg") ;; ;; 1. Search an EUC key (after converting to JIS) on JIS messages. ;; (setq mew-prog-grep-opts '("-j" "jis" "-l" "-e")) ;; ;; 2. Search an EUC key (after converting to JIS) on JIS messages ;; decoding their encoded-words. ;; (setq mew-prog-grep-opts '("-j" "jis" "-l" "-e" "-x" "&mime")) ;; ;; 3. Search an EUC key on JIS messages after converting to EUC by nkf. ;; (setq mew-prog-grep-opts '("-l" "-e" "-z" "nkf -e")) ;; ;; 4. Search an EUC key on JIS messages after converting to EUC ;; and decoding their encoded-words by nkf. Make sure that ;; "nkf" has the "-m" option. ;; (setq mew-prog-grep-opts '("-l" "-e" "-z" "nkf -e -m")) ;; ;; Set mew-prog-vgrep and mew-prog-vgrep-opts also. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Using "Mozilla" ;;; ;(setq mew-prog-text/html-ext "mozilla") ;(define-key mew-message-mode-map [mouse-3] 'browse-url-at-mouse) ;(setq browse-url-netscape-program "mozilla") ;(setq thing-at-point-url-path-regexp "[~/A-Za-z0-9---_.${}#%,:]+") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Using "w3m" with "mew-w3m.el" ;;; ;;; w3m: please use w3m-m17n based on m3m 0.2.5 (or greater maybe). ;;; http://www2u.biglobe.ne.jp/~hsaka/w3m/ ;;; ;;; mew-w3m.el: ;;; cvs -d :pserver:anonymous@cvs.namazu.org:/storage/cvsroot login ;;; cvs -d :pserver:anonymous@cvs.namazu.org:/storage/cvsroot co emacs-w3m ;(setq mew-mime-multipart-alternative-list '("Text/Html" "Text/Plain" "*.")) ;(condition-case nil ; (require 'mew-w3m) ; (file-error nil)) ;(setq w3m-type 'w3m-m17n) (require 'mew-w3m) (setq mew-prog-text/html 'mew-mime-text/html-w3m) ;(setq mew-prog-text/html-ext 'mew-mime-text/html-w3m) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Using "wvHtml", "xlHtml", and "pptHtml" ;;; ;;; Unicode is necessary. So, install Mule-UCS v0.84. ;;; ftp://ftp.m17n.org/pub/mule/Mule-UCS/Mule-UCS-0.84.tar.gz ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Using "wvHtml" ;;; http://www.wvware.com/ ;;; ;;; The default configuration is for the version greater than ;;; or equal to 0.7. For the version prior to 0.7, set as follows: ;(setq mew-use-old-wvhtml t) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Using "xlHtml" and "pptHtml" ;;; http://www.xlhtml.org/ ;;; ;;; The default configuration is for the version greater than ;;; or equal to 0.3. For the version prior to 0.3, set as follows: ;(setq mew-prog-application/msexcel "xlHtml") ;(setq mew-prog-application/mspowerpoint "pptHtml") ;;; ;;; End ;;; ;;------------------------------------------------------------ ;; ;; Gnus-5.7関係の設定 ;; (load "mime-setup") ;(setq gnus-select-method '(nntp "localhost")) (setq gnus-select-method '(nntp "lib100.artie.or.jp")) (add-hook 'gnus-startup-hook 'gnus-mule-initialize) (gnus-mule-add-group "" 'iso-2022-jp) ;(setq gnus-show-mime t) ;(setq gnus-strict-mime t) ;(gnus-kill "From" "hogehoge") ;(gnus-kill "Subject" "hogehoge") (setq user-login-name "m-ito") (setq system-name "mbox.kyoto-inet.or.jp") ;; ;; End ;; ;;------------------------------------------------------------ ;; ;; interface for ingres ;; (load-library "ingres") ;;------------------------------------------------------------ ;; ;; browse-url関係の設定 ;; (autoload 'browse-url-at-point "browse-url" "Ask a WWW browser to load the URL at or before point." t) (autoload 'browse-url-at-mouse "browse-url" "Ask a WWW browser to load a URL clicked with the mouse." t) (autoload 'browse-url-of-buffer "browse-url" "Ask a WWW browser to display BUFFER." t) (autoload 'browse-url-of-file "browse-url" "Ask a WWW browser to display FILE." t) (autoload 'browse-url-of-dired-file "browse-url" "In Dired, ask a WWW browser to display the file named on this line." t) ;(setq browse-url-browser-function 'browse-url-netscape) ;(setq browse-url-netscape-program "jcommunicator") (setq browse-url-browser-function 'browse-url-generic) (setq browse-url-generic-program "w3m.sh") ;; for Mew (add-hook 'mew-message-mode-hook '(lambda () (define-key mew-message-mode-map [mouse-2] 'browse-url-at-mouse) (define-key mew-message-mode-map "\C-cu." 'browse-url-at-point))) ;; for GNUS (add-hook 'gnus-article-mode-hook '(lambda () (define-key gnus-article-mode-map [mouse-2] 'browse-url-at-mouse) (define-key gnus-article-mode-map "\C-cu." 'browse-url-at-point))) ;; for Text (add-hook 'text-mode-hook '(lambda () (define-key text-mode-map [mouse-2] 'browse-url-at-mouse) (define-key text-mode-map "\C-cu." 'browse-url-at-point))) ;; for every one (global-set-key [mouse-2] 'browse-url-at-mouse) (global-set-key "\C-cu." 'browse-url-at-point)