;;; -*- Mode:Emacs-Lisp; -*- ;;; Time-stamp: <2001/05/25 (Fri) 18:12:20 m-hase@ceres.dti.ne.jp> ;;; ;;; Meadow for Win32 Window ;;; ;;; 2000/05/02 : Ver 1.13b1 ;;; 2001/04/11 : Ver 1.14 ;;; ;;; ;;; coding-systemの設定 ;;; (set-language-environment "Japanese") ; (setq file-name-coding-system 'sjis) ; (set-clipboard-coding-system 'sjis-dos) ; (set-w32-system-coding-system 'sjis-dos) ; (set-default-coding-systems 'japanese-shift-jis-dos) ;;; ;;; SHELLの設定 ;;;(DOSコマンドシェルの場合) ;;; ;(setq shell-file-name "command.com") ;(setq shell-command-switch "\\/c") ;(setq explicit-shell-file-name "CMD.EXE") ;(setq shell-file-name "CMD.EXE") ;(setq shell-command-switch "\\/c") (setq explicit-shell-file-name "bash.exe") (setq shell-file-name "bash.exe") (setq shell-command-switch "-c") ;;; ;;; IMEの設定 ;;; (mw32-ime-initialize) (setq select-input-method "MW32-IME") (setq-default mw32-ime-mode-line-state-indicator "[--]") (setq mw32-ime-mode-line-state-indicator-list '("[--]" "[あ]" "[--]")) ;; screen setting ;(load "terminal-font.el") (load "fontset-meadow.el") ;(set-default-font "terminal-fontset") ;(load "bdf-font.el") (load "fixedsys-font.el") (set-default-font "fixedsys-fontset") (set-fontset-font "fixedsys-fontset" 'korean-ksc5601 "hanglm16") (set-fontset-font "fixedsys-fontset" 'chinese-gb2312 "gb16fs") (set-fontset-font "fixedsys-fontset" 'ipa "etl16-ipa") (set-fontset-font "fixedsys-fontset" 'latin-iso8859-1 "8x16") ; mode-line color (set-face-foreground 'modeline "white") (set-face-background 'modeline "black") ;;; 各種モードにおいて色づけを行う設定とする。 (global-font-lock-mode t) ;;; 動的略語展開で大文字小文字を区別 (setq dabbrev-case-fold-search nil) ;;; 起動時のデフォルトディレクトリをホームに。 (cd "~/") ;; 画面末端で一行だけスクロール (setq scroll-step 1) ;; fundamental-modeのかわりに text-modeにする (load-library "text-mode-custom") (setq default-major-mode 'text-mode) ;; サマリー等のバッファは後ろに追いやる (add-hook 'iswitchb-make-buflist-hook 'iswitchb-summaries-to-end) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; shell mode ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; コンソールと同様、プロンプトは最下部にあってほしい (add-hook 'shell-mode-hook '(lambda () (setq comint-scroll-show-maximum-output t))) ;; M-x shell (shell mode)のcoding-systemの指定 (add-hook 'shell-mode-hook (lambda () (set-buffer-process-coding-system 'undecided-dos 'sjis-unix))) ;; shell-modeでの補完 (for drive letter) (setq shell-file-name-chars "~/A-Za-z0-9_^$!#%&{}`'.,:()-") ;;; キーバインド (load-library "xkeyset") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; bold,italic font 表示 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (setq w32-enable-italics t) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Wanderlust ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; SEMI/tm を使うための設定 (require 'mime-setup) (load "mime-setup") (autoload 'wl "wl" "Wanderlust" t) (autoload 'wl-draft "wl-draft" "Write draft with Wanderlust." t) (autoload 'wl-user-agent-compose "wl-draft" nil t) (if (boundp 'mail-user-agent) (setq mail-user-agent 'wl-user-agent)) (if (fboundp 'define-mail-user-agent) (define-mail-user-agent 'wl-user-agent 'wl-user-agent-compose 'wl-draft-send 'wl-draft-kill 'mail-send-hook)) ;; POP-before-SMTPによるメールの送信 (setq wl-draft-send-mail-func 'wl-draft-send-mail-with-pop-before-smtp) (setq wl-pop-before-smtp-user "m-hase") (setq wl-pop-before-smtp-server "pop.ceres.dti.ne.jp") (setq wl-pop-before-smtp-authenticate-type "apop") ;; passwordを記録するファイル (setq elmo-passwd-alist-file-name "~/Mail/passwd") ;; WINDOWサイズ (setq wl-message-window-size '(1 . 3)) ;; iconを使用する (setq wl-highlight-folder-with-icon t) ;; サマリの表示幅 ; (setq wl-summary-width 128) ;; キーバインド変更 ; (define-key global-map "\C-c\C-v" 'browse-url-of-buffer) (add-hook 'wl-summary-mode-hook '(lambda () (define-key wl-summary-mode-map "\C-c\C-s" 'wl-summary-sort-by-subject) (define-key wl-summary-mode-map "\C-c\C-d" 'wl-summary-sort-by-date) (define-key wl-summary-mode-map [C-left] 'wl-summary-exit))) (add-hook 'wl-folder-mode-hook '(lambda () (define-key wl-folder-mode-map [C-right] 'wl-folder-jump-to-current-entity))) ;;; NewsGroupを前方一致で設定 ; (setq wl-folder-hierarchy-access-folders ; '("-fj" "-fj.comp" "-fj.rec" "-fj.soc" "-fj.life" "-fj.sci" ; "-fj.sys" "-fj.net" "-fj.fleamarket")) (setq wl-folder-hierarchy-access-folders '("-fj" "-fj.comp" "-fj.rec" "-fj.rec.games" "-fj.sys" )) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; bbdb ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; (require 'bbdb-wl) ; (bbdb-wl-setup) ; ;; ポップアップ表示 ; (setq bbdb-use-pop-up t) ; ;; 自動収集 ; (setq bbdb/mail-auto-create-p t) ; (setq signature-use-bbdb t) ; (setq bbdb-north-american-phone-numbers-p nil) ; ;; サマリに bbdb の名前を表示 :-)。 ; (setq wl-summary-from-func 'bbdb-wl-from-func) ; ;; 自動的に ML フィールドを加える ; (add-hook 'bbdb-notice-hook 'bbdb-auto-notes-hook) ; (setq bbdb-auto-notes-alist '(("X-ML-Name" (".*$" ML 0)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; sc.el(supercite), sc-register.el ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; (autoload 'sc-cite-original "sc" nil t) ; (setq mail-yank-hooks 'sc-cite-original) ; (setq sc-preferred-header-style 1) ; (setq sc-electric-references-p nil) ; (setq sc-citation-leader "") ; (setq sc-load-hook '(lambda () (require 'sc-register))) ; (setq sc-preferred-attribution 'registeredname) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; mu-cite.el ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; (autoload 'mu-cite/cite-original "mu-cite" nil t) ; (setq mail-citation-hook 'mu-cite/cite-original) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; x-face-mule.el ;;; ;;; Encode 済みの X-Face 文字列を `~/.xface' (変数 `wl-x-face-file' の値です) ;;; の内容に用意しておくと、ドラフトが準備されるときに自動的に X-Faceフィー ;;; ルドとして挿入されます。(変数 `wl-auto-insert-x-face' が non-nil の場合) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (setq wl-highlight-x-face-func (function (lambda (beg end) (x-face-mule-x-face-decode-message-header)))) (require 'x-face-mule) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; dired-dd(Dired-DragDrop) ;;; ;;; dired-dd パッケージに含まれる `dired-dd-mime.el' を組み込めば、GNU Emacs ;;; で編集中の草稿バッファへ dired から Drag&Drop するだけで簡単にマルチパー ;;; トを作成できます(もっとも、Wanderlust 専用ではなく tm/SEMI 汎用ですが)。 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; dired-dd: http://www.asahi-net.or.jp/~pi9s-nnb/dired-dd-home.html ; (add-hook 'dired-load-hook ; (function ; (lambda () ; (load "dired-x") ; ;; Set dired-x variables here. ; ;; To and flo... ; (if window-system ; (progn (require 'dired-dd) ; (require 'dired-dd-mime)))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; シフト+カーソルでコピー範囲を選択 ;;; (通常の(transient-mark-mode t)の効果が消えてしまうのがなんとも) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (load-library "pc-select") (pc-selection-mode) ; (load-library "pc-select-xemacs") ; (pc-selection-mode) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; mhc ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; for ver0.25 ;; (setq mhc-mailer-package 'wl) ;; (autoload 'mhc-mode "mhc" nil t) ;; (add-hook 'wl-summary-mode-hook 'mhc-mode) ;; (add-hook 'wl-folder-mode-hook 'mhc-mode) ;; for develop version (autoload 'mhc-wl-setup "mhc-wl") (add-hook 'wl-init-hook 'mhc-wl-setup) ;; MeadowでもIcon表示する為、強制的にmhc-icon-setupを呼んでみる (autoload 'mhc-icon-setup "mhc-bm") (add-hook 'mhc-setup-hook 'mhc-icon-setup) ;; ディレクトリ構成に設定に応じて、必要であれば ; (setq mhc-base-folder "+schedule") ; (setq mhc-mail-path (expand-file-name "~/Mail")) ;; iconの置き場所 ; (setq mhc-icon-path "D:/Tools/Editor/Meadow/1.13b1/etc/mhc/") (setq mhc-icon-path "D:/Tools/Editor/Meadow/1.14/etc/mhc/") ;; カテゴリ表示用のFace (setq mhc-category-face-alist '( ("jobs" . (bold "black" nil)) ;; お仕事一般 ("Works" . (bold "black" nil)) ;; お仕事一般 ("Work" . (bold "black" nil)) ;; お仕事一般 ("book" . (nil "blue" "light gray")) ;; book発売日 ("dvd" . (nil "brown" "orange")) ;; DVD発売日 ("cd" . (nil "red" "orange")) ;; CD発売日 ("tv" . (nil "dark green" "PaleGreen1")) ;; 地上波/BS-TV放送日 ("cs" . (nil "dark green" nil)) ;; CS-TV放送日 ("event" . (nil "brown" "pink")) ;; イベント ("Private" . (nil "tan" nil)))) ;; プライベート ;; カテゴリ表示用のicon (setq mhc-bm-icon-alist '(("Conflict" . ("Conflict.xbm" "Yellow")) ("Work" . ("Business.xbm" "Black")) ("Book" . ("book.xbm" "Blue")) ("DVD" . ("DVD.xbm" "brown" "orange")) ;; DVD発売日 ("CD" . ("CD.xbm" "red" "orange")) ;; CD発売日 ("TV" . ("TV.xbm" "black" "PaleGreen1")) ;; 地上波/BS-TV放送日 ("CS" . ("TV.xbm" "black" "PaleGreen4")) ;; CS-TV放送日 ("Anniversary" . ("Anniversary.xbm" "Blue")) ("Birthday" . ("Birthday.xbm" "Blue")) ("Other" . ("Other.xbm" "Blue")) ("Party" . ("Party.xbm" "Blue")) ("Vacation.xbm" . ("Vacation.xbm" "Blue")) ("Event" . ("Date.xbm" "HotPink")) ("Private" . ("Private.xbm" "HotPink")) ("Holiday" . ("Holiday.xbm" "OrangeRed" "White")) ("Todo" . ("CheckBox.xbm" "Red")) ("Done" . ("CheckedBox.xbm" "Red")) ("Link" . ("Link.xbm" "Gray")))) ;;-- 至る所を日本語に (setq mhc-summary-line-format "%M%月%D%日%(%W%) %b%e %i%c%s %l") (defun mhc-summary/line-day-of-week-ja-string () (if mhc-tmp-first (aref ["日" "月" "火" "水" "木" "金" "土"] (mhc-day-day-of-week mhc-tmp-dayinfo)) (make-string 2 ? ))) (eval-after-load "mhc-summary" '(setq mhc-summary-line-format-alist (append '((?W (mhc-summary/line-day-of-week-ja-string) 'face mhc-tmp-day-face) (?\( (if mhc-tmp-first "(" " ") 'face mhc-tmp-day-face) (?\) (if mhc-tmp-first ")" " ") 'face mhc-tmp-day-face) (?年 (if mhc-tmp-first "年" " ") 'face mhc-tmp-day-face) (?月 (if mhc-tmp-first "月" " ") 'face mhc-tmp-day-face) (?日 (if mhc-tmp-first "日" " ") 'face mhc-tmp-day-face)) mhc-summary-line-format-alist))) (setq mhc-todo-string-heading "TODO(s) at %04d年%02d月%02d日") (setq mhc-calendar-day-strings ["日" "月" "火" "水" "木" "金" "土"]) (setq mhc-calendar-header-function 'mhc-calendar-make-header-ja) ;;-- MHCモードのフック (setq mhc-mode-hook '(lambda () "MHC モードのフック" (define-key mhc-mode-map [C-up] 'mhc-goto-prev-month) (define-key mhc-mode-map [C-down] 'mhc-goto-next-month) )) (setq mhc-calendar-mode-hook '(lambda () "MHC Calendar モードのフック" (define-key mhc-calendar-mode-map [C-up] 'mhc-calendar-dec-month) (define-key mhc-calendar-mode-map [C-down] 'mhc-calendar-inc-month) (define-key mhc-calendar-mode-map [RET] 'mhc-calendar-goto-view) (define-key mhc-calendar-mode-map " " 'mhc-calendar-goto-view) ;;---------------------------------------- ;; hns schedule edit ;;---------------------------------------- (defun mhc-calendar-hnf-schedule-edit () (interactive) (if mhc-calendar-link-hnf (let ((find-file-not-found-hooks nil) (count (mhc-calendar/in-summary-hnf-p))) (if (functionp hnf-initial-function);; hns-mode require APEL :-) (add-hook 'find-file-not-found-hooks '(lambda () (funcall hnf-initial-function)))) (let ((date (mhc-calendar-get-date))) (find-file-other-window (mhc-calendar/hnf-get-schedule-filename date)) (goto-char (point-max)) (insert (mhc-calendar/hnf-get-schedule-day date)))))) (defun mhc-calendar/hnf-get-schedule-filename (date) (expand-file-name (mhc-date-format date "y%04d%02d" yy mm) (if hnf-diary-year-directory-flag (expand-file-name (mhc-date-format date "%04d" yy) hnf-diary-dir) hnf-diary-dir))) (defun mhc-calendar/hnf-get-schedule-day (date) (mhc-date-format date "%02d/%02d " mm dd)) (define-key mhc-calendar-mode-map "S" 'mhc-calendar-hnf-schedule-edit) )) ;;-- 3ヶ月カレンダーとハイパー日記システム(hns)をリンクさせる (setq mhc-calendar-link-hnf t) ;;-- カレンダーを[apps]で呼び出す。 (define-key global-map [apps] 'mhc-calendar) (define-key global-map [S-apps] 'mhc-goto-this-month) (define-key global-map [C-apps] 'hnf) (define-key global-map [M-apps] 'yotei) ;;-- 前後の月の summary での表示 (setq mhc-use-wide-scope 'week) ;;-- summary バッファに縦に入る3ヶ月カレンダの表示フラグ (setq mhc-insert-calendar nil) ; (setq mhc-use-week-separator 6) ;;-- 表示するカテゴリを限定 (setq mhc-default-category "!cs") ;;-- ヒストリが効くようにする from MHC-ML [2001/02/17] ; (setq mhc-category-hist '("Party" "Meeting" "Private" ...)) ; mhc-month-hist, mhc-subject-hist, mhc-location-hist, ; mhc-date-hist でも同じようなことができるはずですが、確認はしてい ; ません。 (setq mhc-category-hist '("Conflict" "Work" "Book" "DVD" "CD" "TV" "Anniversary" "Birthday" "Other" "Party" "Vacation.xbm" "Event" "Private" "Holiday" "Todo" "Done" "Link")) ; (defun mhc-calendar-hnf-edit () ; (interactive) ; (if mhc-calendar-link-hnf ; (let ((find-file-not-found-hooks nil) ; (count (mhc-calendar/in-summary-hnf-p))) ; (if (functionp hnf-initial-function);; hns-mode require APEL :-) ; (add-hook 'find-file-not-found-hooks ; '(lambda () (funcall hnf-initial-function)))) ; (find-file-other-window ; (mhc-calendar/hnf-get-filename (mhc-calendar-get-date))) ; (and (integerp count) (mhc-calendar/hnf-search-title count))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; YaTeX/yahtml ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (cond ((locate-library "yatex") (autoload 'yatex-mode "yatex" "Yet Another LaTeX mode" t) ;; 拡張子が .tex のファイルを開くときに yatex-mode にする (setq auto-mode-alist (cons '("\\.tex$" . yatex-mode) auto-mode-alist)) ;; 漢字コードの指定(1=sjis, 2=jis, 3=euc) (setq YaTeX-kanji-code 1) ;; 外部コマンドの指定(パスが通ってない場合は絶対パスで記述) (setq tex-command "platex") (setq dvi2-command "dviout") (setq bibtex-command "jbibtex") ;; yatex-mode 初期化時の設定 (add-hook 'yatex-mode-hook (function (lambda () ;; outline-minor-mode の設定(使用しない場合は不要) (outline-minor-mode t) ; outline-minor-mode を起動 (make-local-variable 'outline-regexp) (setq outline-regexp ; 見出しの正規表現 (concat "[ \t]*\\\\" "\\(appendix\\|documentstyle\\|part\\|chapter\\|" "section\\|subsection\\|subsubsection\\|" "paragraph\\|subparagraph\\)" "\\*?[ \t]*[[{]")) ;; font-lock の設定(使用しない場合は不要) (make-local-variable 'font-lock-defaults) (setq font-lock-defaults '(tex-font-lock-keywords-2 t))))) ;; yatex ロード時の設定 (add-hook 'yatex-mode-load-hook (function (lambda () ;; メニュー選択時に IME をオフにする (wrap-function-to-control-ime 'YaTeX-typeset-menu t "P")))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (cond ((locate-library "yahtml") (autoload 'yahtml-mode "yahtml" "Yet Another html mode" t) ;; font-lockでは固まるので・・・ (load-library "hilit19") ;; 拡張子が .html, .htm のファイルを開くときに yahtml-mode にする (setq auto-mode-alist (cons '("\\.html?$" . yahtml-mode) auto-mode-alist)) ;; 漢字コードの指定(1=sjis, 2=jis, 3=euc) ; (setq yahtml-kanji-code 2) (setq yahtml-kanji-code 3) ;; HTML のタグを大文字にする (setq yahtml-prefer-upcases t) ;; 属性指定子を大文字にする (setq yahtml-prefer-upcase-attributes t) ;; yahtml モードの起動が遅い場合に次の設定を有効にする ;; アクセス制限ファイル .htaccess を参照しないようにする (setq yahtml-server-type nil) ;; 外部コマンドの指定(パスが通ってない場合は絶対パスで記述) ; (setq yahtml-www-browser "d:/tools/editor/meadow/1.13b1/bin/fiber") ; fiber で Web ブラウザを起動 (setq yahtml-www-browser "fiber") ; fiber で Web ブラウザを起動 (setq yahtml-lint-program "jweblint") (setq html-font-lock-keywords '(("<\\([!?][a-zA-Z0-9]+\\)" 1 font-lock-keyword-face) ("<\\(/?[a-zA-Z0-9]+\\)" 1 font-lock-function-name-face) ("<\\(/?[a-zA-Z0-9]+\\)" (1 font-lock-function-name-face) ("\\([-_a-zA-Z]+\\)=\\([0-9]+\\|\"[^\"]*\"\\)" nil nil (1 font-lock-variable-name-face) (2 font-lock-string-face))) ("[&%][-.a-zA-Z0-9]+;?" . font-lock-variable-name-face) ("" . font-lock-comment-face) ("<\\([hH][1-6]\\|[bB]\\|TITLE\\|title\\)>\\([^<]+\\)" 2 'bold) ("<\\([iI]\\)>\\([^<]+\\)" 2 'italic))) ;; yahtml-mode 初期化時の設定 (add-hook 'yahtml-mode-hook (function (lambda () ;; outline-minor-mode の設定(使用しない場合は不要) (outline-minor-mode t) ; outline-minor-mode を起動 ;; 見出しの正規表現 (make-local-variable 'outline-regexp) (setq outline-regexp "^.*<[Hh][1-6]\\>") ;; 見出し終わりの正規表現 (make-local-variable 'outline-heading-end-regexp) (setq outline-heading-end-regexp "") ;; 見出しレベルの計算式 (make-local-variable 'outline-level) (setq outline-level (function (lambda () (char-after (1- (match-end 0)))))) ;; font-lock の設定 ; (make-local-variable 'font-lock-defaults) ; (setq font-lock-defaults '(html-font-lock-keywords t)) ; (turn-on-font-lock) ))) ;; yahtml ロード時の設定 (add-hook 'yahtml-load-hook (function (lambda () ;; メニュー選択時に IME をオフにする (wrap-function-to-control-ime 'yahtml-browse-menu t nil)))))) ;;; ---------------------------------------------------------------- ;;: line.el ;;; 行指向の編集機能 ;;; ---------------------------------------------------------------- (autoload 'move-line-upward "line" "" t) (autoload 'move-line-downward "line" "" t) (autoload 'duplicate-line "line" "" t) (autoload 'duplicate-line-and-comment-one-line "line" "" t) (autoload 'comment-line "line" "" t) (autoload 'uncomment-line "line" "" t) (autoload 'copy-current-line "line" "" t) (autoload 'kill-current-line "line" "" t) (autoload 'mark-whole-line "line" "" t) (autoload 'copy-to-end-of-line "line" "" t) (define-key global-map [C-up] 'move-line-upward) (define-key global-map [C-down] 'move-line-downward) (define-key global-map [f12] 'duplicate-line) (define-key ctl-x-map [f12] 'duplicate-line-and-comment-one-line) (define-key global-map [C-semicolon] 'comment-line) (define-key global-map [C-plus] 'uncomment-line) (define-key global-map [S-undo] 'copy-current-line) (define-key global-map [S-delete] 'kill-current-line) (define-key esc-map "k" 'copy-to-end-of-line) (define-key global-map [insert] 'other-window) ; (define-key global-map [apps] 'other-window) ;; ---------------------------------------------------------------- ;; insert-pair.el ;; いろいろなものをペアで挿入する ;; ---------------------------------------------------------------- (autoload 'insert-double-qoute "insert-pair" nil t) (autoload 'insert-single-qoute "insert-pair" nil t) (autoload 'insert-back-qoute "insert-pair" nil t) (autoload 'insert-brace "insert-pair" nil t) (autoload 'insert-bracket "insert-pair" nil t) (autoload 'insert-<> "insert-pair" nil t) (autoload 'insert-slash "insert-pair" nil t) (autoload 'insert-kagi-kakko "insert-pair" nil t) (autoload 'canna-insert-brace-or-kagi-kakko "insert-pair" nil t) (autoload 'insert-brace-and-indent "insert-pair" nil t) (define-key esc-map "'" 'insert-single-qoute) (define-key esc-map "\"" 'insert-double-qoute) (define-key esc-map "`" 'insert-back-qoute) (define-key esc-map "{" 'canna-insert-brace-or-kagi-kakko) (define-key esc-map "[" 'insert-bracket) ;(define-key global-map '(control ?{) 'insert-brace-and-indent) (define-key global-map [C-\{] 'insert-brace-and-indent) ;;; ---------------------------------------------------------------- ;;; misc.el ;;; その他もろもろ ;;; ---------------------------------------------------------------- ; (load "~/.xemacs/misc.el") (autoload 'toggle-modifier-keys-are-sticky "misc" "" t) (autoload 'shell-other-window "misc" "" t) (autoload 'match-paren "misc" "" t) (autoload 'select-scratch "misc" "" t) (autoload 'search-at-mark "misc" "" t) (autoload 'select-scratch "misc" "" t) (autoload 'memo "misc" "" t) (autoload 'bookmark "misc" "" t) (autoload 'open-dot-emacs "misc" "" t) ;(autoload 'open-dot-xemacs "misc" "" t) ;(autoload 'open-xemacs-memo "misc" "" t) ;(define-key global-map '(control ?.) 'toggle-modifier-keys-are-sticky) ;(define-key global-map '(control !) 'shell-other-window) (define-key esc-map "]" 'match-paren) (define-key esc-map "s" 'select-scratch) (define-key esc-map "@" 'search-at-mark) ;; 別窓で M-x shell を実行(2000.11.04) (define-key esc-map "1" 'shell-other-window) ;;; 指定したファイルをワンキーでオープンする (global-set-key [C-S-m] 'open-dot-meadow) (global-set-key [C-S-b] 'bookmark) ;(global-set-key '(control E) 'open-dot-xemacs) ;(global-set-key '(control X) 'open-xemacs-memo) ;;;---------------------------------------------------------------- ;;; abbrev ;;;---------------------------------------------------------------- (load "abbrev") (provide 'abbrev) (setq save-abbrevs t) (setq abbrev-file-name "~/.meadow/.abbrev_defs") ; (read-abbrev-file) (quietly-read-abbrev-file) ;; 既に"*Abbrevs*"バッファが存在している場合は ;; 単にバッファをスイッチするだけの動作とする ;; カーソルがいちいちバッファの先頭に飛んでしまうのが ;; 使いづらいので用意したもの ;; 95.11.27 (Mon) (defadvice edit-abbrevs (around select-buffer-if-already-exist first activate) "Simply select \"*Abbrevs*\" buffer if it already exists ." (interactive) (if (member "*Abbrevs*" (mapcar (function (lambda (buf) (buffer-name buf))) (buffer-list))) ;; 既にバッファが存在する場合 (switch-to-buffer "*Abbrevs*") ad-do-it)) (define-key esc-map " " 'expand-abbrev) (define-key global-map [M- ] 'expand-abbrev) (define-key ctl-x-map "ae" 'edit-abbrevs) ;;;---------------------------------------------------------------- ;;; dabbrev ;;;---------------------------------------------------------------- (require 'hippie-exp) ;;; 多機能補完パッケージ ;;; hippie-exp.elの機能のデフォルトの設定 ;;; これはモードフックでまめに設定しなおすのが望ましい ;;; 95.11.14 (Tue) (setq hippie-expand-try-functions-list '(try-complete-file-name-partially try-complete-file-name try-expand-all-abbrevs try-expand-list try-expand-line try-expand-dabbrev try-expand-dabbrev-all-buffers try-expand-dabbrev-from-kill try-complete-lisp-symbol-partially try-complete-lisp-symbol)) ;; dabbrev-expandを ;; もっと高機能にする ;; (現在のバッファで見つからなければ他のバッファも探すようにする) ;; 95.11.15 (Wed) ;; ;; (1) 見えているウインドウを優先する ;; (2) kill-ringも見る ;; 98.5.27 (Wed) (fset 'hippie-expand-dabbrev (make-hippie-expand-function '(try-expand-dabbrev-visible try-expand-dabbrev-from-kill try-expand-whole-kill try-expand-dabbrev try-expand-dabbrev-all-buffers) ;; 展開した単語の素性がわかるように t)) ;;; ;;; カレントバッファおよび他のバッファ中の ;;; リストの展開 ;;; 95.11.15 (Wed) ;;; (fset 'hippie-expand-list (make-hippie-expand-function '(try-expand-list try-expand-list-all-buffers) t)) ;; ファイル名の展開 ;; 98.5.27 (Wed) ;; これは (comint-dynamic-complete)にしたほうがよいか? (fset 'hippie-expand-filename (make-hippie-expand-function '(try-complete-file-name-partially try-complete-file-name) t)) (define-key esc-map "/" 'hippie-expand-dabbrev) (define-key global-map "\C-^" 'abbrev-prefix-mark) (define-key esc-map "*" 'hippie-expand-list) (define-key esc-map "_" 'hippie-expand) ;(define-key global-map '(control space) 'hippie-expand-filename) ;;; Ruby mode (autoload 'ruby-mode "ruby-mode.el" "Ruby mode" t) (setq auto-mode-alist (append '(("\\.rb$" . ruby-mode)) auto-mode-alist)) ; to edit Ruby code ; ;;; regionを目立つようにする[1999/03/09:m-hase@ceres.dti.ne.jp] (transient-mark-mode t) ;;; 対応する"()"の網掛け表示を有効にする.[2000/02/17 : m-hase@ceres.dti.ne.jp] ;(require 'paren) ;(paren-set-mode 'sexp) ;;; ;;; Add Key Bind ;;; (define-key global-map [TAB] "\C-q\t") (define-key global-map [S-TAB] "\C-q\t") ;(define-key global-map '(iso-left-tab) "\C-q\t") (define-key global-map "\C- " 'set-mark-command) (define-key global-map "\S- " "\C-q ") (define-key global-map "\M-g" 'goto-line) (define-key global-map [f17] 'query-replace) (define-key global-map [f5] 'replace-string) (define-key global-map [f6] 'canna-toggle-japanese-mode-with-cursor-color) (define-key global-map [f7] 'occur) ;(define-key global-map 'delete "\C-d") (define-key global-map [C-.] 'mhc-goto-this-month) ;;; リージョンのハイライト ; (transient-mark-mode t) ;;; 対応するカッコをハイライト表示 (show-paren-mode 1) ;;; 現在の行位置を表示 (line-number-mode 1) ;;; 現在の桁位置を表示 (column-number-mode 1) ;;; 時刻表示 (display-time) ;;; IME の on と off でカーソルの色を変えたいのですが。 (add-hook 'mw32-ime-on-hook (function (lambda () (set-cursor-color "red")))) (add-hook 'mw32-ime-off-hook (function (lambda () (set-cursor-color "black")))) ;;; *Message* バッファが増えなくするためには (setq message-log-max nil) ;;; ビープ音が鳴るのがうるさいのですが。 (setq visible-bell t) ;;; バッファの最後で next-line を実行しても、 新しい行が挿入されないようにして欲しいのですが。 (setq next-line-add-newlines nil) ;;; キーバインド ; (load-library "xkeyset") ;;; MHC起動 ; (mhc-mode) ; (mhc-goto-this-month) ;;; ekb-isearch.el は IME (Input Method Engine) 経由で入力した文字列を使って、 ;;; isearch (インクリメンタル・サーチ) を実行するためのライブラリです。 ;;; これを使うことで、日本語文字列の isearch が可能になります。 (if (locate-library "ekb-isearch") (require 'ekb-isearch)) ;;; namazu (require 'browse-url) (setq browse-url-generic-program "fiber") (setq browse-url-browser-function 'browse-url-generic) (autoload 'namazu "namazu" nil t) ; Namazu のインデックスの指定 ; 環境に合わせて変更する (setq namazu-default-dir "~/namazu/Mail ~/namazu/public_html ~/namazu/doc ~/namazu/wdic") ;;;---------------------------------------------------------------- ;;; Text Adjust (TEXT 整形ツール) ;;;---------------------------------------------------------------- (load "text-adjust") ;;;---------------------------------------------------------------- ;;; フォント設定 ;;;---------------------------------------------------------------- ;; BDF フォント設定(共通部分) (load "fontset-bdf-base") ;; BDF フォントの在処 (setq bdf-font-directory "D:/TOOLS/Editor/Meadow/fonts/bdf") ;; BDF, 16 ドット (load "~/.meadow/fontset-bdf16") ;; BDF, 16 ドット、まるもじ (load "~/.meadow/fontset-maru16") ;; BDF, 14 ドット、まるもじ (load "~/.meadow/fontset-maru14") ;; ビットマップフォントの作成(x-face, Gnus 用) ; (let ((font-file (expand-file-name "Misc/etl8x16-bitmap.bdf" "D:/Tools/Editor/Meadow/1.13b1/intlfonts-1.2/"))) ; (when (and (locate-library "bitmap") (file-exists-p font-file)) ; (require 'bitmap) ; (setq logfont-charset-list ; `((((bdf-font ,font-file)) ; ((bitmap . 0))))) ; (setq charset-font-list ; (append (my-define-font "bdf16-" font-param logfont-charset-list) ; charset-font-list)))) ;(require 'bitmap) ;(setq font-param ; '((overhang . 0) ; (base . 10) ; (height . 14) ; (width . 7))) ;(setq logfont-charset-list ; `((((bdf-font ,"D:/Tools/Editor/Meadow/1.13b1/intlfonts-1.2/Misc/etl8x16-bitmap.bdf")) ; ((bitmap . 0))))) ;(setq charset-font-list ; (append (my-define-font "bdf16-" font-param logfont-charset-list) ; charset-font-list)) ; ;(setq charset-font-list ; (my-define-font "bdf16-" font-param logfont-charset-list)) ; ;(let ((font "bdf16-bitmap")) ; (if (member font (w32-font-list)) ; (setq charset-font-list ; (cons (cons 'bitmap font) charset-font-list)))) ; ;;;---------------------------------------------------------------- ;;; intfont-1.2 (bdf-fontset をまるもじ仕様に変更) ;;;---------------------------------------------------------------- (load "~/.meadow/myfont_custom.el") ;; フレーム設定 (setq default-frame-alist (append '((foreground-color . "black" ); 前景色 (background-color . "AntiqueWhite" ); 背景色 ; (background-color . "peach puff" ); 背景色 ; (background-color . "dark olive green" ); 背景色 (border-color . "black" ); ボーダー色(Meadow では無効?) (mouse-color . "black" ); マウス色(???) (cursor-color . "DarkGreen" ); カーソル色 (width . 128 ); フレーム幅(文字数) (height . 30 ); フレーム高(文字数) (top . 1 ); フレームの Y 位置(ピクセル数) (left . 68 ); フレームの X 位置(ピクセル数) (line-space . 2 ); 行間2pixelあける (ime-font . "w16-japanese-jisx0208") ; IME 用のフォント ; (font . "maru14" ); デフォルトのフォントセット (font . "bdf-fontset" ); デフォルトのフォントセット ) default-frame-alist)) ;;;---------------------------------------------------------------- ;;; IRC ;;;---------------------------------------------------------------- (require 'cfirchat) (load "~/.meadow/.irchat_vars.el") ;(require 's-region) ;; (load "s-region") ;(s-region-bind) ; ;; ;; shiftを押していないとregionが消えるのは使いづらいので ;; ;; 関数を再定義して回避する(regionを消したい時は c-g) ;(defun s-region-nomark ()) ; ;;;; 一定秒数ほおっておくと自動的に fontifyする ;;;; s-regionと相性が悪いので外した 98.5.22 (Fri) ;;;; (setq lazy-lock-stealth-time 600) ;(setq lazy-lock-stealth-time nil) ;;;---------------------------------------------------------------- ;;; マーク位置に色を付ける.(2000/11/14) ;;;---------------------------------------------------------------- (if window-system (progn (load-library "tails-mark") (setq mark-face 'region))) ;;; ---------------------------------------------------------------- ;;; time-stamp.el (2000/11/20) ;;; ---------------------------------------------------------------- (add-hook 'write-file-hooks 'time-stamp) (defun time-stamp-day () "Return the current time as a string in \"\(Day\)\" form." (format-time-string "(%3a)")) (defun time-stamp-uname () "Return the current time as a string in \"username\" form." (format-time-string "m-hase@ceres.dti.ne.jp")) ; (setq time-stamp-format '(time-stamp-yyyy/mm/dd time-stamp-day time-stamp-hh:mm:ss time-stamp-uname )) (setq time-stamp-format "%04Y/%02m/%02d (%3a) %02H:%02M:%02S m-hase@ceres.dti.ne.jp") (defun time-stamp-date () "Return the current time as a string in \"\(Date\)\" form." ; (format-time-string "[%04Y/%02m/%02d] %02H:%02M:%02S")) (format-time-string "%04Y/%02m/%02d [%02H:%02M:%02S]")) (defun insert-date nil "Insert Date." (interactive) (insert (time-stamp-date))) ;; キーバインド変更 (define-key global-map "\C-c\C-i" 'insert-date) ; (defun insert-time-stamp nil ; "Insert Time Stamp." ; (interactive) ; (insert "Time-stamp: <>")) (defun insert-time-stamp nil "Insert time stamp. Comment out whole line if necessary." (interactive) (require 'time-stamp) (let (beg commented-out-p) (save-excursion (beginning-of-line) (setq beg (point) commented-out-p (and comment-start (looking-at comment-start))) (and (>= (count-lines (point-min) (point)) time-stamp-line-limit) (error "Time stamp must be within first %d lines." time-stamp-line-limit)) (insert "Time-stamp: <" (time-stamp-string) ">") (and comment-start (not commented-out-p) (comment-region beg (point)))))) ;;;---------------------------------------------------------------- ;;; tab サイズ変更(2000.12.09) ;;;---------------------------------------------------------------- (setq tab-width 4) ; (add-hook 'text-mode-hook ; '(lambda () ; (setq tab-width 4))) (add-hook 'text-mode-hook (lambda () (setq tab-width 4) (auto-fill-mode t) (setq filladapt-mode t) ;; override center-line (define-key text-mode-map "\es" 'select-scratch) )) (add-hook 'c-mode-hook '(lambda () (setq tab-width 4))) (add-hook 'c++-mode-hook '(lambda () (setq tab-width 4))) ;;;---------------------------------------------------------------- ;;; ハイパー日記システム (hnf) [2000/12/19] ;;;---------------------------------------------------------------- (autoload 'hnf "hnf-mode" nil t) (autoload 'hnf-mode "hnf-mode" nil t) (autoload 'yotei "hnf-yotei" nil t) (setq auto-mode-alist (cons '("\\.hnf$" . hnf-mode) auto-mode-alist)) (setq hnf-diary-dir "~/diary") (setq hnf-html-dir "~/public_html/diary") (setq hnf-diary-year-directory-flag t) (setq hnf-hour-not-today 6) (add-hook 'hnf-mode-load-hook '(lambda () (setq hnf-commands-table (append '( ("ISBN" . ((args . (("isbn" . ((face . hnf-link-face))) ("title"))))) ("CD" . ((args . (("code" . ((face . hnf-link-face))) ("title"))))) ("TABLE" . ((need-close) ; (args . (("place" . ((face . hnf-link-face) ; (complete . (("c") ("r") ("l") ("n"))))) ; ("width" . ((face . hnf-link-face) ; (complete . (("100%") ("90%") ; ("80%") ("70%") ; ("60%") ("50%") ; ("40%") ("20%"))))) ; ("caption"))) (insert-string-after-newline . "TR \nTD "))) ("TR" . ((insert-string-after-newline . "TD "))) ("TH") ("TD") ("TAG") ("RAW" . ((need-close)))) hnf-commands-table)))) ;; ---------------------------------------------------------------- ;; auto-insert ;; ---------------------------------------------------------------- (require 'autoinsert) ; [test]:2000/11/28 (add-hook 'find-file-hooks 'auto-insert) ;; pcl-cvsが作るテンポラリファイルのバッファでは(auto-insert)しない ;; 98.8.25 (Tue) (defadvice auto-insert (around deactivate-autoinsert-for-cvs-temp-buffer first activate) "Deactivate autoinsert feature for pcl-cvs work buffer." (or (string-match "pcl-cvs\.[0-9a-zA-Z]+\\'" (buffer-file-name)) (string-match "Mail/draft" (buffer-file-name)) ; (string-match "\\+draft/[0-9]+" (buffer-name)) ad-do-it) nil) ;; テンプレートとなるファイルがあるディレクトリ ;; 末尾に"/"が必要なので注意 (setq auto-insert-directory "~/.meadow/autoinsert/") ;; 質問しないで auto-insertを実行する (setq auto-insert-query nil) ;; 下請け関数 ;; 簡単な置換を実行した後 ;; "EDIT_HERE"まで進んで"EDIT_HERE"自体は削除する ;; buffer-modified-p は、変数 auto-insertを見て ;; 仕様に従って設定される ;; 98.5.28 (Thu) (defun auto-insert-expand-abbrev-and-set-point (template-file) "Advance to edit point after auto-insert" (insert-file-contents (concat auto-insert-directory template-file)) (let ((replace-alist '( ("<TODAY>" . (format-time-string "%04Y/%02m/%02d (%3a)")) ("<FILENAME>" . (file-name-nondirectory (buffer-file-name))) ("<PROJECT>" . "secret") ("<TIMESTAMP>" . (concat "Time-stamp: <" (time-stamp-string) ">")) ("<AUTHOR>" . user-mail-address))) (case-replace nil) pat sexp) ;; 定型の置換 (while replace-alist (setq pat (car (car replace-alist)) evaled (eval (cdr (car replace-alist)))) (goto-char (point-min)) (while (re-search-forward pat nil t) (replace-match evaled 'fixedcase 'literal)) (setq replace-alist (cdr replace-alist)))) ;; 編集位置まで進む (goto-char (point-min)) (and (search-forward "<EDIT_HERE>" nil t) (replace-match "")) (set-buffer-modified-p (eq auto-insert t))) ;; これは今後だいぶ調整する必要がある。まあぼちぼち…… (setq auto-insert-alist (append '( ;;========================================[2001/05/12] ;; yahtml-mode ((yahtml-mode . "yahtml document") . (lambda nil (auto-insert-expand-abbrev-and-set-point "html-insert.html"))) ;;========================================[2001/02/07] ;; ruby-mode ((ruby-mode . "Ruby script") . (lambda nil (auto-insert-expand-abbrev-and-set-point "ruby-insert.rb"))) ;; spu-mode ((spu-mode . "SPU Assembler") . (lambda nil (auto-insert-expand-abbrev-and-set-point "spu-insert.s"))) ;; vhdl-mode ((vhdl-mode . "VHDL source file") . (lambda nil (auto-insert-expand-abbrev-and-set-point "vhdl-insert.vhd"))) ;;========================================[2001/02/14] ;; HNF-mode ((hnf-mode . "Hyper Nikki File") . (lambda nil (auto-insert-expand-abbrev-and-set-point "hnf-insert.hnf"))) ;; cgi-mode [2001/03/04] (("\\.cgi\\'" . "CGI script") . (lambda nil (auto-insert-expand-abbrev-and-set-point "perl-insert.pl"))) ;; sed script (("\\.sed\\'" . "sed script") . (lambda nil (auto-insert-expand-abbrev-and-set-point "sed-insert.sed"))) ;; perl-mode ((perl-mode . "Perl script") . (lambda nil (auto-insert-expand-abbrev-and-set-point "perl-insert.pl"))) ;; awk-mode ((awk-mode . "awk script") . (lambda nil (auto-insert-expand-abbrev-and-set-point "awk-insert.awk"))) ;; Makefile (("[Mm]akefile\\'" . "Makefile") . (lambda nil (auto-insert-expand-abbrev-and-set-point "makefile.inc"))) ;; java source code ((java-mode . "Java source code") . (lambda nil (auto-insert-expand-abbrev-and-set-point "java-insert.java"))) ;; html ;; @@@ ;; autoinsertのメカニズムが、別の何かで上書きされているようだ ;; (やめてほしいぞ) ;; (未調査) ;; @@@ ((html-mode . "html document") . (lambda nil (auto-insert-expand-abbrev-and-set-point "html-insert.html"))) (("\\.tex\\'" . "TeX source") . (lambda nil (auto-insert-expand-abbrev-and-set-point "tex-insert.tex"))) ;; text-mode ((text-mode . "generic text header") . (lambda nil (auto-insert-expand-abbrev-and-set-point "doc-insert.doc"))) ;; emacs-lisp source ;; autoinsert.el から取って、少し変えたもの ;; これが最も手が込んでいる(skeleton-insertを利用している) (("\\.el\\'" . "Emacs Lisp header") "Short description: " ";;; " (file-name-nondirectory (buffer-file-name)) " --- " str " ;; Copyright (C) " (substring (current-time-string) -4) " by " "Makoto Hasegawa" " ;; Time-stamp: <> ;; Author: " (user-full-name) '(if (search-backward "&" (save-excursion (beginning-of-line 1) (point)) t) (replace-match (capitalize (user-login-name)) t t)) '(end-of-line 1) " <" (user-login-name) ?@ (system-name) "> ;; Keywords: " '(require 'finder) ;;'(setq v1 (apply 'vector (mapcar 'car finder-known-keywords))) '(setq v1 (mapcar (lambda (x) (list (symbol-name (car x)))) finder-known-keywords) v2 (mapconcat (lambda (x) (format "%10.0s: %s" (car x) (cdr x))) finder-known-keywords "\n")) ((let ((minibuffer-help-form v2)) (completing-read "Keyword, C-h: " v1 nil t)) str ", ") & -2 " ;; This file is part of XEmacs. ;; XEmacs is free software; you can redistribute it and/or modify it ;; under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; XEmacs is distributed in the hope that it will be useful, but ;; WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ;; 02111-1307, USA. ;;; Synched up with: Not in FSF ;;; Commentary: ;; " _ " ;;; Code: (provide '" (file-name-sans-extension (file-name-nondirectory (buffer-file-name))) ") ;;; " (file-name-nondirectory (buffer-file-name)) " ends here ") ) auto-insert-alist)) ; (setq auto-insert-alist ; (cons '("\\.el$" . "elisp-insert.el") auto-insert-alist)) ;; " ;;;---------------------------------------------------------------- ;;; navi2ch [2001/02/10] ;;;---------------------------------------------------------------- ; (setq load-path ; (append '("/usr/local/share/emacs/site-lisp") load-path)) (require 'navi2ch) (autoload 'navi2ch "navi2ch" "Navi2ch" t) ; (setq navi2ch-net-http-proxy "localhost:8080" ; navi2ch-net-force-update t) ;;;---------------------------------------------------------------- ;;; gnuclient [2001/02/16] ;;;---------------------------------------------------------------- (require 'gnuserv) (gnuserv-start) ;; 新しいフレームを開きたくない場合 (setq gnuserv-frame (selected-frame)) ;; 終了しないようにする [2001/03/02] (define-key global-map "\C-x\C-c" 'delete-frame) ;;;---------------------------------------------------------------- ;;; sdic-mode 用の設定 [2001/02/17] ;;;---------------------------------------------------------------- ; (setq load-path (cons "$(datadir)/emacs/site-lisp/lookup" load-path)) (autoload 'sdic-describe-word "sdic" "英単語の意味を調べる" t nil) (global-set-key "\C-cw" 'sdic-describe-word) (autoload 'sdic-describe-word-at-point "sdic" "カーソルの位置の英単語の意味を調べる" t nil) (global-set-key "\C-cW" 'sdic-describe-word-at-point) (global-set-key "\C-c\C-w" 'sdic-describe-word-at-point) ;; 辞書の指定 (setq sdic-eiwa-dictionary-list '((sdicf-client "~/lib/dict/gene.sdic"))) ; (setq sdic-waei-dictionary-list '((sdicf-client "~/lib/dict/jedict.sdic"))) (setq sdic-waei-dictionary-list '((sdicf-client "~/lib/dict/jedict.sdic" (add-keys-to-headword t)))) ; [WDICグループ] 通信用語の基礎知識 ; COMM.DIC 通信情報編 通信に関するアプリケーション技術を紹介 ; TRAN.DIC 通信技術編 通信に関する伝送技術を紹介 ; DEV.DIC 通信機器編 通信に関する関する装置・機器を紹介 ; CODE.DIC 情報符号編 情報通信に利用される符号化や文字コード等を紹介 ; MISC.DIC 通信雑学編 通信に関する雑学知識を紹介 ; TELI.DIC 電話情報編 電話に関する用語やサービスなどの情報を紹介 ; TELT.DIC 電話技術編 電話に関する伝送技術を紹介 ; ORG.DIC 団体編 通信に関する団体を紹介 ; YOGO.DIC 用語編 ネットワークスラングを紹介 ; ; [TECHグループ] 電算用語の基礎知識 ; COMP.DIC 基本情報編 コンピュータの基本的または技術的なものを紹介 ; INFO.DIC 応用情報編 コンピュータの応用的なものを紹介 ; TECH.DIC 技術編 コンピュータに関する技術を紹介 ; HARD.DIC 電算機器編 コンピュータに関する装置・機器を紹介 ; KNOW.DIC 技術雑学編 コンピュータに関する雑学知識を紹介 ; STUD.DIC 雑学知識編 各種雑学知識を紹介 ; SOFT.DIC ソフト編 ソフトウェア製品に関する情報を紹介 ; APPL.DIC アプリ編 ソフトウェア製品そのものについて紹介 ; ELEC.DIC 電子編 電気・電子技術を紹介 ; STD.DIC 標準規格編 標準規格に関する情報を紹介 ; PROD.DIC 機器製品編 コンピュータを中心とした装置機器の商品名を紹介 ; SCI.DIC 科学編 物理・数学・化学等や科学的思想・SF系分野 ; ; [MOEグループ] 萌色用語の基礎知識 ; MANGA.DIC まんが編 まんが・アニメ等に関する用語を紹介 ; DOJIN.DIC 同人編 同人に関する用語を紹介 ; SAKKA.DIC 作家編 作家名に関する用語を紹介 ; TITLE.DIC 固有名詞編 作品タイトルや登場人物に関する用語を紹介 ; VOICE.DIC 声優編 声優や歌手に関する用語を紹介 ; GAME.DIC ゲーム編 ゲームに関する情報を紹介 ; MILI.DIC 軍事編 軍隊等に関する情報を紹介 ; MOE.DIC 萌え編 萌え系雑学を紹介 ; ; ; [RAILグループ] 鉄道用語の基礎知識 ; RAIL.DIC 鉄道編 鉄道などの用語を詳しく紹介. ; RCMP.DIC 鉄道会社編 鉄道の会社に関する用語を詳しく紹介. ; ;(setq sdic-eiwa-dictionary-list ; '( ; ;;[WDICグループ] 通信用語の基礎知識 ; (sdicf-client "~/lib/dict/COMM.sdic" (add-keys-to-headword t)) ;通信情報編 ; (sdicf-client "~/lib/dict/TRAN.sdic" (add-keys-to-headword t)) ;通信技術編 ; (sdicf-client "~/lib/dict/DEV.sdic" (add-keys-to-headword t)) ;通信機器編 ; (sdicf-client "~/lib/dict/CODE.sdic" (add-keys-to-headword t)) ;情報符号編 ; (sdicf-client "~/lib/dict/MISC.sdic" (add-keys-to-headword t)) ;通信雑学編 ; (sdicf-client "~/lib/dict/TELI.sdic" (add-keys-to-headword t)) ;電話情報編 ; (sdicf-client "~/lib/dict/TELT.sdic" (add-keys-to-headword t)) ;電話技術編 ; (sdicf-client "~/lib/dict/ORG.sdic" (add-keys-to-headword t)) ;団体編 ; (sdicf-client "~/lib/dict/YOGO.sdic" (add-keys-to-headword t)) ;用語編 ; ; ;;[TECHグループ] 電算用語の基礎知識 ; (sdicf-client "~/lib/dict/COMP.sdic" (add-keys-to-headword t)) ;基本情報編 ; (sdicf-client "~/lib/dict/INFO.sdic" (add-keys-to-headword t)) ;応用情報編 ; (sdicf-client "~/lib/dict/TECH.sdic" (add-keys-to-headword t)) ;技術編 ; (sdicf-client "~/lib/dict/HARD.sdic" (add-keys-to-headword t)) ;電算機器編 ; (sdicf-client "~/lib/dict/KNOW.sdic" (add-keys-to-headword t)) ;技術雑学編 ; (sdicf-client "~/lib/dict/STUD.sdic" (add-keys-to-headword t)) ;雑学知識編 ; (sdicf-client "~/lib/dict/SOFT.sdic" (add-keys-to-headword t)) ;ソフト編 ; (sdicf-client "~/lib/dict/APPL.sdic" (add-keys-to-headword t)) ;アプリ編 ; (sdicf-client "~/lib/dict/ELEC.sdic" (add-keys-to-headword t)) ;電子編 ; (sdicf-client "~/lib/dict/STD.sdic" (add-keys-to-headword t)) ;標準規格編 ; (sdicf-client "~/lib/dict/PROD.sdic" (add-keys-to-headword t)) ;機器製品編 ; (sdicf-client "~/lib/dict/SCI.sdic" (add-keys-to-headword t)) ;科学編 ; ; ;;[MOEグループ] 萌色用語の基礎知識 ; (sdicf-client "~/lib/dict/DOJIN.sdic"(add-keys-to-headword t)) ;まんが編 ; (sdicf-client "~/lib/dict/GAME.sdic" (add-keys-to-headword t)) ;同人編 ; (sdicf-client "~/lib/dict/MANGA.sdic"(add-keys-to-headword t)) ;作家編 ; (sdicf-client "~/lib/dict/MILI.sdic" (add-keys-to-headword t)) ;固有名詞編 ; (sdicf-client "~/lib/dict/MOE.sdic" (add-keys-to-headword t)) ;萌え編 ; (sdicf-client "~/lib/dict/SAKKA.sdic"(add-keys-to-headword t)) ;ゲーム編 ; (sdicf-client "~/lib/dict/TITLE.sdic"(add-keys-to-headword t)) ;軍事編 ; (sdicf-client "~/lib/dict/VOICE.sdic"(add-keys-to-headword t)) ;声優編 ; ; ;;[RAILグループ] 鉄道用語の基礎知識 ; (sdicf-client "~/lib/dict/RAIL.sdic" (add-keys-to-headword t)) ;鉄道編 ; (sdicf-client "~/lib/dict/RCMP.sdic" (add-keys-to-headword t)) ;鉄道会社編 ; ; (sdicf-client "~/lib/dict/gene.sdic")) ; sdic-waei-dictionary-list ; '( ; ;;[WDICグループ] 通信用語の基礎知識 ; (sdicf-client "~/lib/dict/COMM.sdic" (add-keys-to-headword t)) ;通信情報編 ; (sdicf-client "~/lib/dict/TRAN.sdic" (add-keys-to-headword t)) ;通信技術編 ; (sdicf-client "~/lib/dict/DEV.sdic" (add-keys-to-headword t)) ;通信機器編 ; (sdicf-client "~/lib/dict/CODE.sdic" (add-keys-to-headword t)) ;情報符号編 ; (sdicf-client "~/lib/dict/MISC.sdic" (add-keys-to-headword t)) ;通信雑学編 ; (sdicf-client "~/lib/dict/TELI.sdic" (add-keys-to-headword t)) ;電話情報編 ; (sdicf-client "~/lib/dict/TELT.sdic" (add-keys-to-headword t)) ;電話技術編 ; (sdicf-client "~/lib/dict/ORG.sdic" (add-keys-to-headword t)) ;団体編 ; (sdicf-client "~/lib/dict/YOGO.sdic" (add-keys-to-headword t)) ;用語編 ; ; ;;[TECHグループ] 電算用語の基礎知識 ; (sdicf-client "~/lib/dict/COMP.sdic" (add-keys-to-headword t)) ;基本情報編 ; (sdicf-client "~/lib/dict/INFO.sdic" (add-keys-to-headword t)) ;応用情報編 ; (sdicf-client "~/lib/dict/TECH.sdic" (add-keys-to-headword t)) ;技術編 ; (sdicf-client "~/lib/dict/HARD.sdic" (add-keys-to-headword t)) ;電算機器編 ; (sdicf-client "~/lib/dict/KNOW.sdic" (add-keys-to-headword t)) ;技術雑学編 ; (sdicf-client "~/lib/dict/STUD.sdic" (add-keys-to-headword t)) ;雑学知識編 ; (sdicf-client "~/lib/dict/SOFT.sdic" (add-keys-to-headword t)) ;ソフト編 ; (sdicf-client "~/lib/dict/APPL.sdic" (add-keys-to-headword t)) ;アプリ編 ; (sdicf-client "~/lib/dict/ELEC.sdic" (add-keys-to-headword t)) ;電子編 ; (sdicf-client "~/lib/dict/STD.sdic" (add-keys-to-headword t)) ;標準規格編 ; (sdicf-client "~/lib/dict/PROD.sdic" (add-keys-to-headword t)) ;機器製品編 ; (sdicf-client "~/lib/dict/SCI.sdic" (add-keys-to-headword t)) ;科学編 ; ; ;;[MOEグループ] 萌色用語の基礎知識 ; (sdicf-client "~/lib/dict/DOJIN.sdic"(add-keys-to-headword t)) ;まんが編 ; (sdicf-client "~/lib/dict/GAME.sdic" (add-keys-to-headword t)) ;同人編 ; (sdicf-client "~/lib/dict/MANGA.sdic"(add-keys-to-headword t)) ;作家編 ; (sdicf-client "~/lib/dict/MILI.sdic" (add-keys-to-headword t)) ;固有名詞編 ; (sdicf-client "~/lib/dict/MOE.sdic" (add-keys-to-headword t)) ;萌え編 ; (sdicf-client "~/lib/dict/SAKKA.sdic"(add-keys-to-headword t)) ;ゲーム編 ; (sdicf-client "~/lib/dict/TITLE.sdic"(add-keys-to-headword t)) ;軍事編 ; (sdicf-client "~/lib/dict/VOICE.sdic"(add-keys-to-headword t)) ;声優編 ; ; ;;[RAILグループ] 鉄道用語の基礎知識 ; (sdicf-client "~/lib/dict/RAIL.sdic" (add-keys-to-headword t)) ;鉄道編 ; (sdicf-client "~/lib/dict/RCMP.sdic" (add-keys-to-headword t)) ;鉄道会社編 ; ; (sdicf-client "~/lib/dict/jedict.sdic" (add-keys-to-headword t)))) ; ;;;---------------------------------------------------------------- ;;; lookup 用の設定 [2001/05/02] ;;;---------------------------------------------------------------- (autoload 'lookup "lookup" nil t) (autoload 'lookup-region "lookup" nil t) (autoload 'lookup-pattern "lookup" nil t) (define-key ctl-x-map "l" 'lookup) (define-key ctl-x-map "y" 'lookup-region) (define-key ctl-x-map "\C-y" 'lookup-pattern) ;;;---------------------------------------------------------------- ;;; w3m.el 用の設定 [2001/02/26] ;;;---------------------------------------------------------------- (autoload 'w3m "w3m" "Interface for w3m on Emacs." t) (autoload 'w3m-browse-url "w3m" "Interface for w3m on Emacs." t) (autoload 'w3m-search "w3m-search" "*Search QUERY using SEARCH-ENGINE." t) (autoload 'w3m-antenna "w3m-antenna" "*Report chenge of WEB sites." t) (autoload 'w3m-antenna-add-current-url "w3m-antenna" "*Add link of current page to antenna." t) (setq w3m-command "d:/tools/cygwin/usr/local/w3m/bin/w3m.exe") (setq w3m-bookmark-file "~/.w3m/bookmark.html") ; (setq w3m-bookmark-file "file://e/home/.w3m/bookmark.html") ; (setq w3m-home-page "~/.w3m/bookmark.html") ; (setq w3m-home-page "file:/e/home/.w3m/bookmark.html") (setq w3m-home-page "http://localhost:8080/~MAKOPi/antenna/") (setq w3m-weather-default-area "栃木県・北部") (setq w3m-display-inline-image nil) (setq w3m-search-default-engine "google-ja") ; new (setq w3m-use-form nil) ; When using w3m with M.N.C. patch, set non-nil value. ; (setq w3m-mnc t) (setq w3m-mnc nil) ; (setq hnf-diary-url (concat "http://" (system-name) ":8080" "/" ; "~" (user-login-name) "/diary/")) (setq hnf-diary-url (concat "http://" "localhost" ":8080" "/" "~" (user-login-name) "/diary/")) ;■■ browse-url ;以下のように設定しておくと、URI に類似した文字列がある場所で C-x m と ;入力すれば、w3m で表示されるようになる。 (setq browse-url-browser-function 'w3m-browse-url) (autoload 'w3m-browse-url "w3m" "Ask a WWW browser to show a URL." t) (global-set-key "\C-xm" 'browse-url-at-point) ;■■ dired ; 以下のように設定しておくと、dired-mode のバッファでファイルを選択して ; いる状態で C-x m と入力すれば、該当ファイルが w3m で表示されるように ; なる。\ (add-hook 'dired-mode-hook (lambda () (define-key dired-mode-map "\C-xm" 'dired-w3m-find-file))) (defun dired-w3m-find-file () (interactive) (require 'w3m) (let ((file (dired-get-filename))) (if (y-or-n-p (format "Open 'w3m' %s " (file-name-nondirectory file))) (w3m-find-file file)))) ; ■■ hnf-mode ; 以下のように設定しておくと、hnf-mode にて C-c C-b と入力すれば、 ; w3m で最新の日記が表示されるようになる。 (autoload 'w3m-browse-url "w3m" nil t) ; (defun w3m-hnf-browse-url-w3m (url &optional new-window) ; (interactive (browse-url-interactive-arg "URL: ")) ; (save-selected-window ; (pop-to-buffer (get-buffer-create "*w3m*")) ; (w3m-browse-url url new-window))) ; (setq hnf-browse-url-browser-function (function w3m-hnf-browse-url-w3m)) (defun w3m-hnf-browse-url-w3m (url &optional new-window) (interactive (browse-url-interactive-arg "URL: ")) (save-selected-window (pop-to-buffer (get-buffer-create "*w3m*")) (w3m-browse-url url new-window))) (setq hnf-browse-url-browser-function (function w3m-hnf-browse-url-w3m)) ;; キーバインド追加 [2001/02/17] (define-key global-map "\C-c\C-f" 'w3m-browse-url) (define-key global-map "\C-c\C-s" 'w3m-search) (setq w3m-mode-hook '(lambda () "w3mモードのデフォルト" ;;-- 再定義する ; (defun w3m-view-image () ; "*View Image" ; (interactive) ; (w3m-view-image-ex)) (defun w3m-copy-this-url () "*Print the URL of the link under point and push it into kill-ring." (interactive) (w3m-save-this-url) (w3m-print-this-url)) (define-key w3m-mode-map "A" 'w3m-antenna-add-current-url) (define-key w3m-mode-map "u" 'w3m-copy-this-url) ; (define-key w3m-mode-map [u] 'w3m-save-this-url) (define-key w3m-mode-map [up] 'previous-line) (define-key w3m-mode-map [down] 'next-line) (define-key w3m-mode-map [right] 'forward-char) (define-key w3m-mode-map [left] 'backward-char) (define-key w3m-mode-map [C-up] 'w3m-previous-anchor) (define-key w3m-mode-map [C-down] 'w3m-next-anchor) (define-key w3m-mode-map [C-right] 'w3m-view-this-url) (define-key w3m-mode-map [C-left] 'w3m-view-previous-page) )) ; (defun google-search (query) ; (interactive "sGoogle search: ") ; (w3m (concat "http://www.google.com/search?q=" query))) (defun arcstar-search (query) (interactive "sArcstar MUSIC search: ") (w3m (concat "http://www.arcstarmusic.com/qr_nn.asp?n=" query))) ;;;---------------------------------------------------------------- ;;; mime-w3m 用の設定 [2001/03/01] ;;;---------------------------------------------------------------- (setq mime-setup-enable-inline-html nil) (eval-after-load "mime-view" '(progn (autoload 'mime-w3m-preview-text/html "mime-w3m") (ctree-set-calist-strictly 'mime-preview-condition '((type . text) (subtype . html) (body . visible) (body-presentation-method . mime-w3m-preview-text/html))) (set-alist 'mime-view-type-subtype-score-alist '(text . html) 3))) ;;;---------------------------------------------------------------- ;;; text-mode 用の設定 [2001/02/28] ;;;---------------------------------------------------------------- ; ; (put 'text-mode 'font-lock-defaults ; '(text-font-lock-keywords t)) ; ; (setq text-font-lock-keywords ; '(;; 見出し ; ("^\\(●\\)\\(.+\\)$" . font-lock-keyword-face) ; ("^\\(■\\)\\(.+\\)$" . font-lock-keyword-face) ; ("^\\(--\\)\\(.+\\)$" . font-lock-keyword-face) ; ("^\\(【\\)\\(.+\\)$" . font-lock-keyword-face) ; ; ("^\\(\\[\\|\\*\\|<\\|@\\|\\$\\)\\(.+\\)$" . font-lock-keyword-face) ; ("^\\(#\\)\\(.*\\)$" . font-lock-comment-face))) ; ;; outline-minor-mode を使う (add-hook 'yahtml-mode-hook '(lambda () (make-local-variable 'outline-minor-mode-prefix) (setq outline-minor-mode-prefix "\C-c") (make-local-variable 'outline-regexp) (setq outline-regexp "<h[1-6]>") (outline-minor-mode t))) ;;;---------------------------------------------------------------- ;;; 拡張子別にデフォルト coding system を設定 [2001/03/06] ;;;---------------------------------------------------------------- (setq file-coding-system-alist (append '( ("\\.hnf$" . euc-japan) ) file-coding-system-alist)) ;;;---------------------------------------------------------------- ;;; SKYPerfecTV検索 [2001/03/09] ;;;---------------------------------------------------------------- (defun sptv-search (ch) (interactive "sSkyPerfecTV Channel search: ") (w3m (concat "http://www.sp3.com/EPG/programi/cgi-bin/bean.pl?rf=0&ofs=0&ch=" ch))) ; (defun skaper-search (channel) ; "*Display SKYPerfecTV ch search." ; (interactive ; (list (if current-prefix-arg ; (completing-read "Input area: " w3m-weather-url-alist nil t) ; 276))) ; (message (format "http://www.sp3.com/EPG/programi/cgi-bin/bean.pl?rf=0&ofs=0&ch=%s" channel))) ; (defun skaper-search (ch) ; (interactive "sSkyPerfecTV Channel search: ") ; (w3m (concat "http://www.sp3.com/cgi-bin/bean.pl?rf=0&ofs=0&ch=" ch))) ;;; Weather: (require 'w3m) (defun w3m-sptv () "*Display SKYPerfecTV programs." (interactive) ; (w3m (format "http://www.sp3.com/EPG/programi/cgi-bin/bean.pl?rf=0&ofs=0&ch=%s" ch))) (w3m (format "http://www.sp3.com/EPG/programi/cgi-bin/bean.pl?rf=0&ofs=0&ch=%s" 276))) ;;;---------------------------------------------------------------- ;;; css-mode [2001/05/12] ;;;---------------------------------------------------------------- (autoload 'css-mode "css-mode" "css-mode" t) (setq auto-mode-alist (cons '("\\.css$" . css-mode) auto-mode-alist)) ;;;---------------------------------------------------------------- ;;; css-mode [2001/05/14] ;;;---------------------------------------------------------------- (autoload 'htmlize-file "htmlize" "htmlize" t) (autoload 'htmlize-buffer "htmlize" "htmlize" t) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; このファイルに間違いがあった場合に全てを無効にします (put 'eval-expression 'disabled nil) (setq minibuffer-max-depth nil)