;;;; -*- mode: lisp-interaction; syntax: elisp; coding: iso-2022-7bit -*- ;;;; ;;;; ~/.emacs.el Setting file for Emacsean ;;;; ;;;; Copyright (C) 2002 SUFIC http://sufic.fc2web.com ;;;; ;;;; last updated : 2002/08/31 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; 言語設定 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Mule-UCS の設定 ;;; ftp://ftp.m17n.org/pub/mule/Mule-UCS/ ;;; (set-language-environment) の前に設定します ;;; Mule-UCS を利用しない場合コメントアウトしてください。 (require 'un-define) ;Unicode (require 'jisx0213) ;JIS X 0213 ;;; 日本語環境設定 (set-language-environment "Japanese") (set-w32-system-coding-system ' sjis) (set-keyboard-coding-system ' sjis) (set-clipboard-coding-system ' sjis-dos) (setq-default buffer-file-coding-system 'sjis-dos) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; IMEの設定 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; 基本設定 (mw32-ime-initialize) (setq default-input-method "MW32-IME") ;;; Windows IME の ON/OFF 状態をモードラインに表示 (setq mw32-ime-show-mode-line t) ; デフォルトで t(表示する)。 ;;; モードラインに表示される IME のインジケータ変更 ;;; OFF : [--] ;;; ON : [あ] (setq-default mw32-ime-mode-line-state-indicator "[--]") (setq mw32-ime-mode-line-state-indicator-list '("[--]" "[あ]" "[--]")) ;; IME の ON/OFF でカーソルの色を変える ; (cursor-type が box, bar の場合) (add-hook 'mw32-ime-on-hook (lambda () (set-cursor-color "brown"))) ; ON (add-hook 'mw32-ime-off-hook (lambda () (set-cursor-color "black"))) ; OFF ;;; IME の制御 (自動的にIMEを切る) (wrap-function-to-control-ime 'y-or-n-p nil nil) (wrap-function-to-control-ime 'yes-or-no-p nil nil) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; POBox ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; POBox用の設定 ;;; POBoxを利用しない場合はコメントアウト (autoload 'pobox-mode "pobox" "POBox mode" t) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; SKK ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; SKK用の設定 ;;; SKKを利用しない場合コメントアウト (require 'skk-autoloads) (global-set-key "\C-x\C-j" 'skk-mode) (global-set-key "\C-xj" 'skk-auto-fill-mode) (global-set-key "\C-xt" 'skk-tutorial) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; 各種設定 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; 行番号・桁番号表示 (line-number-mode t) (column-number-mode t) ;;; 時刻表示 (display-time) ;;; 行末の空白を削除する (goto-char (point-min)) (while (re-search-forward "[ \t]+$" nil t) (replace-match "" nil nil)) ;;; バッファの最後の行で next-line しても新しい行を作らない (setq next-line-add-newlines nil) ;;; バッファの切り替え (defun previous-buffer () "Select previous window." (interactive) (bury-buffer)) (defun backward-buffer () "Select backward window." (interactive) (switch-to-buffer (car (reverse (buffer-list))))) (global-set-key "\C-t" 'previous-buffer) (global-set-key "\M-\C-t" 'backward-buffer) ;;; タイトルバーに今開いてるファイルのフルパスかバッファ名を表示する (defvar dired-mode-p nil) (add-hook 'dired-mode-hook (lambda () (make-local-variable 'dired-mode-p) (setq dired-mode-p t))) (setq frame-title-format-orig frame-title-format) (setq frame-title-format '((buffer-file-name "%f" (dired-mode-p default-directory mode-line-buffer-identification)))) ;;; 更新日時挿入 (require 'time-stamp) (add-hook 'write-file-hooks 'time-stamp) (setq time-stamp-active t) (setq time-stamp-start "last updated : ") (setq time-stamp-format "%04y/%02m/%02d") (setq time-stamp-end " \\|$") ;;; .emacsがうまく動いているかのチェック。 (setq debug-on-error t);;; *Backtrace*に結果が出力される。 ;;; 検索において,大文字・小文字の区別しない. (setq-default case-fold-search t) ;;; 対応する括弧の強調 (require 'paren) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; font-lockモード--色付き表示 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'font-lock) (global-font-lock-mode t) ;;; 全角スペースを強調表示 (defface my-face-b-1 '((t (:background "gray"))) nil) (defvar my-face-b-1 'my-face-b-1) (defadvice font-lock-mode (before my-font-lock-mode ()) (font-lock-add-keywords major-mode '((" " 0 my-face-b-1 append) ))) (ad-enable-advice 'font-lock-mode 'before 'my-font-lock-mode) (ad-activate 'font-lock-mode) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 以下個別emacs-lisp用設定 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; w3--ブラウザ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; 基本設定 (require 'w3-auto) ;;; ホームページ設定 (setq w3-default-homepage "http://www.yahoo.co.jp/") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; w3m--ブラウザ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; 基本設定 (require 'w3m) ;;; フレームの表示(簡易) (defun my-w3m-fontify-frames () "Insert frame contents directry." (save-excursion (goto-char (point-min)) (save-match-data (while (re-search-forward "]*src=\"\\([^\"]*\\)\"[^>]*>" nil t) (let* ((url (save-match-data (w3m-expand-url (match-string 1))))) (delete-region (match-beginning 0) (match-end 0)) (insert (with-temp-buffer (let ((out (current-buffer))) (with-temp-buffer (let ((type (w3m-retrieve url))) (when type (w3m-prepare-content url type out))))) (buffer-string)))))))) (add-hook 'w3m-fontify-before-hook 'my-w3m-fontify-frames) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; lookup--ネット検索用 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (setq load-path (cons "c:/usr/Meadow/site-lisp/lookup" load-path)) (setq Info-default-directory-list (cons "c:/usr/Meadow/info" Info-default-directory-list)) ;;; オートロードの設定 (autoload 'lookup "lookup" nil t) (autoload 'lookup-region "lookup" nil t) (autoload 'lookup-pattern "lookup" nil t) (autoload 'lookup-current-word "lookup" nil t) ;;; キーバインドの設定 (define-key ctl-x-map "l" 'lookup) ; C-x l - lookup (define-key ctl-x-map "y" 'lookup-region) ; C-x y - lookup-region (define-key ctl-x-map "\C-y" 'lookup-pattern) ; C-x C-y - lookup-pattern (setq lookup-search-agents '((ndtp "dserver") (ndspell))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; 検索 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; lookup・w3・w3mを利用 ;;; 初期設定 (require 'browse-url) (require 'lookup) ;; replace-in-string (MeadowとかのEmacs20系には必要) (defun replace-in-string (str regexp newtext &optional literal) "Replaces all matches in STR for REGEXP with NEWTEXT string, and returns the new string. Optional LITERAL non-nil means do a literal replacement. Otherwise treat \\ in NEWTEXT string as special: \\& means substitute original matched text, \\N means substitute match for \(...\) number N, \\\\ means insert one \\." ;;; (check-argument-type 'stringp str) ;;; (check-argument-type 'stringp newtext) (let ((rtn-str "") (start 0) (special) match prev-start) (while (setq match (string-match regexp str start)) (setq prev-start start start (match-end 0) rtn-str (concat rtn-str (substring str prev-start match) (cond (literal newtext) (t (mapconcat (lambda (c) (if special (progn (setq special nil) (cond ((eq c ?\\) "\\") ((eq c ?&) (substring str (match-beginning 0) (match-end 0))) ((and (>= c ?0) (<= c ?9)) (if (> c (+ ?0 (length (match-data)))) ;; Invalid match num (error "Invalid match num: %c" c) (setq c (- c ?0)) (substring str (match-beginning c) (match-end c)))) (t (char-to-string c)))) (if (eq c ?\\) (progn (setq special t) nil) (char-to-string c)))) newtext "")))))) (concat rtn-str (substring str start)))) ;;; google-encording (defun google-encoding (str) (setq str (encode-coding-string str 'shift_jis)) (let* ((len (length str)) (ret (make-string (* len 3) ?a)) (i 0) (j 0) char type) (while (< i len) (setq char (aref str i)) (if (< char 126) (aset ret j char) (aset ret j ?%) (setq j (1+ j)) (aset ret j (aref "0123456789ABCDEF" (lsh char -4))) (setq j (1+ j)) (aset ret j (aref "0123456789ABCDEF" (logand char 15)))) (setq i (1+ i) j (1+ j))) (substring ret 0 j))) ;;; google検索 (defun google (str option) (w3m-browse-url (concat "http://www.google.com/search?q=" (replace-in-string (google-encoding str) " +" "+") "&num=100" option ))) ;;; google日本語のページのみ (defun google-ja (str &optional module) (interactive (list (read-string "Google search: " (lookup-current-word)))) (google str "&hl=ja&lr=lang_ja")) (global-set-key "\C-c\C-g" 'google-ja) ;;[Ctrl-c][Ctrl-g]にバインド ;;; google全言語 (defun google-all (str &optional module) (interactive (list (read-string "Google search: " (lookup-current-word)))) (google str "")) ;;; googleジャンプ (defun google-jump (str &optional module) (interactive (list (read-string "Google jump: " (lookup-current-word)))) (google str "&hl=ja&btnI=I%27m+Feeling+Lucky")) (global-set-key "\C-c\C-j" 'google-jump) ;;[Ctrl-c][Ctrl-j]にバインド ;; 英和辞典 (defun eiwa-goo (str &optional flag) (interactive (list (cond ((eq last-command 'mouse-drag-region) (car kill-ring)) ((or (and transient-mark-mode mark-active) (eq last-command 'exchange-point-and-mark)) (buffer-substring-no-properties (region-beginning) (region-end))) (t (thing-at-point 'sexp))) current-prefix-arg)) (if flag nil (setq str (read-from-minibuffer "EXCEED英和辞典【検索語】: " (lookup-current-word)))) (w3m (concat "http://dictionary.goo.ne.jp/cgi-bin/dict_search.cgi?MT=" (w3m-url-encode-string str 'shift_jis) "&sw=0"))) (global-set-key "\C-c\C-e" 'eiwa-goo) ;; 和英辞典 (defun waei-goo (str &optional flag) (interactive (list (cond ((eq last-command 'mouse-drag-region) (car kill-ring)) ((or (and transient-mark-mode mark-active) (eq last-command 'exchange-point-and-mark)) (buffer-substring-no-properties (region-beginning) (region-end))) (t (thing-at-point 'sexp))) current-prefix-arg)) (if flag nil (setq str (read-from-minibuffer "EXCEED和英辞典【検索語】: " (lookup-current-word)))) (w3m (concat "http://dictionary.goo.ne.jp/cgi-bin/dict_search.cgi?MT=" (w3m-url-encode-string str 'shift_jis) "&sw=1"))) (global-set-key "\C-c\C-w" 'waei-goo) ;; 国語辞典 (defun kokugo-goo (str &optional flag) (interactive (list (cond ((eq last-command 'mouse-drag-region) (car kill-ring)) ((or (and transient-mark-mode mark-active) (eq last-command 'exchange-point-and-mark)) (buffer-substring-no-properties (region-beginning) (region-end))) (t (thing-at-point 'sexp))) current-prefix-arg)) (if flag nil (setq str (read-from-minibuffer "大辞林第二版【検索語】: " (lookup-current-word)))) (w3m (concat "http://dictionary.goo.ne.jp/cgi-bin/dict_search.cgi?MT=" (w3m-url-encode-string str 'shift_jis) "&sw=2"))) (global-set-key "\C-c\C-k" 'kokugo-goo) ;; infoseek 辞書 (defun infoseek-jisyo (str) (interactive (list (read-string "infoseek jisyo: " (google-current-word)))) (browse-url (concat "http://jiten.www.infoseek.co.jp/Kokugo?pg=result_k.html&col=KO&qt=" (replace-in-string (google-encoding str) " +" "+") "&sm=1"))) ;;; 英辞郎 (require 'w3 "w3") (require 'lookup "lookup") (defun eijiro-hexify-string (string) "Escape characters in a string as shift-jis." (mapconcat (function (lambda (char) (if (not (memq char url-unreserved-chars)) (if (< char 16) (upcase (format "%%0%x" char)) (upcase (format "%%%x" char))) (char-to-string char)))) (encode-coding-string string 'shift_jis) "")) (defun eijiro (pattern &optional dummy) "Look up PATTERN in the online Eijiro dictionary." (interactive (lookup-pattern-input)) (let ((cgi "http://home.alc.co.jp/db/owa/eijiro_red2") (word-prefix "word_in=") (mode-prefix "type_in=") (mode "ej") (url) (hexified-pattern) (top-margin 15)) (or (string-match "^[a-zA-Z '\"\?!]+$" pattern) (setq mode "je")) (setq hexified-pattern (eijiro-hexify-string pattern)) (setq url (concat cgi "?" word-prefix hexified-pattern "&" mode-prefix mode)) (w3-fetch url) (message (concat "Looking up : " (lookup-current-word) )) (set-window-point (selected-window) (point-min)) (scroll-up top-margin))) (global-set-key "\C-c\C-d" 'eijiro) ;;[Ctrl-c][Ctrl-d]にバインド ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; TRR タイピング ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (autoload 'trr "c:/usr/Meadow/site-lisp/trr19/trr" nil t) (setenv "TRRDIR" "c:/usr/Meadow/site-lisp/trr19") (setenv "TRRBINDIR" "c:/usr/Meadow/site-lisp/trr19") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; MHC スケジュール管理 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (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) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Ufm ファイラー ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (load-library "Ic-Ufm") (setq exec-path (append (list "c:/Personal/Program/cygwin/bin/")exec-path)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; PDICW 辞書 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defvar pdicw-command "\"c:\\Program Files\\Personal Dictionary\\PDICW32.exe\"" "*PDICW: The program of Personal Dictionary for Win32 (PDICW).") (load "pdicw" t t) (global-set-key "\C-c\C-p" 'pdicw-find-word-at-point) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Wanderlust --- E-mail and Netnews reader ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (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)) ;;; Unicode? ;(require 'un-define) ;(require 'un-tools) (wrap-function-to-control-ime 'y-or-n-p nil nil) (wrap-function-to-control-ime 'yes-or-no-p nil nil) (define-key isearch-mode-map "\C-k" 'isearch-edit-string) (setq next-line-add-newlines nil) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 各種編集モード ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; html-helper-mode ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (autoload 'html-helper-mode "html-helper-mode" "Yay HTML" t) ;;; ;;; Recommended configuration ;;; (setq html-helper-do-write-file-hooks t) (setq html-helper-build-new-buffer t) (setq html-helper-address-string "(sufic@csc.jp)") (add-hook 'html-helper-mode-hook '(lambda () (font-lock-mode 1))) ;;; 更新時刻の自動挿入 ;;; ;;; ;;; と記述します。 (setq html-helper-do-write-file-hooks t) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; css-mode ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'css-mode) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; EPO ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; 基本設定 (autoload 'epo "epo" "Editing Process Organizer" t) ;;; epojava mode (require 'epoan) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; YaTeX ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (setq auto-mode-alist (cons (cons "\\.tex$" 'yatex-mode) auto-mode-alist)) (autoload 'yatex-mode "yatex" "Yet Another LaTeX mode" t) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; フォント設定 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; 小さ目の英字用フォントの作成 (let ((font "Courier-9")) (w32-add-font "Courier-9" '((encoding-type . 0) (charset-num . 0) (overhang . 0) (base . 11) (height . 14) (width . 7))) ;; 論理フォントの指定(ノーマル) (w32-change-font-logfont font 0 '(w32-logfont "Courier New" 0 -12 400 0 nil nil nil 0 1 3 49)) ;; 論理フォントの指定(ボールド) (w32-change-font-logfont font 1 '(w32-logfont "Courier New" 0 -12 700 0 nil nil nil 0 1 3 49)) ;; 論理フォントの指定(イタリック) (w32-change-font-logfont font 2 '(w32-logfont "Courier New" 0 -12 400 0 t nil nil 0 1 3 49)) ;; 論理フォントの指定(ボールド・イタリック) (w32-change-font-logfont font 3 '(w32-logfont "Courier New" 0 -12 700 0 t nil nil 0 1 3 49))) ;;; 小さ目の日本語用フォントの作成 (let ((font "Nihongo-9")) (w32-add-font font '((encoding-type . 4) (charset-num . 128) (overhang . 0) (base . 11) (height . 14) (width . 7))) ;; 論理フォントの指定(ノーマル) (w32-change-font-logfont font 0 '(w32-logfont "MS ゴシック" 0 -12 400 0 nil nil nil 128 1 3 49)) ;; 論理フォントの指定(ボールド) (w32-change-font-logfont font 1 '(w32-logfont "MS ゴシック" 0 -12 700 0 nil nil nil 128 1 3 49)) ;; 論理フォントの指定(イタリック) ←イタリックを明朝で代用 (w32-change-font-logfont font 2 '(w32-logfont "MS 明朝" 0 -12 400 0 nil nil nil 128 1 3 49)) ;; 論理フォントの指定(ボールド・イタリック) ←イタリックを明朝で代用 (w32-change-font-logfont font 3 '(w32-logfont "MS 明朝" 0 -12 700 0 nil nil nil 128 1 3 49))) ;;; 小さ目のフォントセットを設定する。 (new-fontset "small-fontset" '((ascii . "Courier-9") (latin-iso8859-1 . "Courier-9") (katakana-jisx0201 . "Nihongo-9") (japanese-jisx0208 . "Nihongo-9") (latin-jisx0201 . "Nihongo-9") )) ;; ;; 13pt 日本語フォントの設定 (let ((font "Nihongo-19") (logfont '(w32-logfont "MS ゴシック" 0 -16 400 0 nil nil nil 128 1 3 49)) (logfonti '(w32-logfont "MS 明朝" 0 -16 400 0 nil nil nil 128 1 3 17))) (create-font-from-logfont-list font (list logfont (w32-change-logfont-weight logfont 300) logfonti (w32-change-logfont-weight logfonti 300)) 4)) ;;;; BDF フォント設定 ;; intlfonts-1.2.tar.gz が必要です ;; http://www.ring.gr.jp/archives/GNU/intlfonts/intlfonts-1.2.tar.gz ;; http://ring.asahi-net.or.jp/archives/GNU/intlfonts/intlfonts-1.2.tar.gz ;; ftp://ftp.m17n.org/pub/mule/intlfonts-1.2.tar.gz ;; ftp://ftp.gnu.org/pub/gnu/intlfonts/intlfonts-1.2.tar.gz ;; などから入手してください ;; c:/usr/Meadow/intlfonts-1.2に展開した場合の設定例となっています。 (defvar bdf-font-directory "c:/usr/Meadow/intlfonts-1.2") (defvar bdf-font-name-prefix "bdffont16-") (defvar bdf-font-file-alist '((ascii "European/lt1-16-etl.bdf" 0) (latin-iso8859-1 "European/lt1-16-etl.bdf" 1) ; ISO8859-1 (latin-iso8859-2 "European/lt2-16-etl.bdf" 1) ; ISO8859-2 (latin-iso8859-3 "European/lt3-16-etl.bdf" 1) ; ISO8859-3 (latin-iso8859-4 "European/lt4-16-etl.bdf" 1) ; ISO8859-4 (cyrillic-iso8859-5 "European/cyr16-etl.bdf" 1) ; ISO8859-5 (arabic-iso8859-6 "Misc/arab16-0-etl.bdf" 0) ; ISO8859-6 ??? (greek-iso8859-7 "European/grk16-etl.bdf" 1) ; ISO8859-7 (hebrew-iso8859-8 "Misc/heb16-etl.bdf" 1) ; ISO8859-8 (latin-iso8859-9 "European/lt5-16-etl.bdf" 1) ; ISO8859-9 (thai-tis620 "Asian/thai16.bdf" 1) ; TIS620 (katakana-jisx0201 "japanese.X/8x16rk.bdf" 1) ; JISX0201 (latin-jisx0201 "japanese.X/8x16rk.bdf" 0) ; JISX0201 (japanese-jisx0212 "japanese/jksp16.bdf" 0) ; JISX0212 (japanese-jisx0208-1978 "japanese/j78-16.bdf" 0) ; JISX0208.1978 (japanese-jisx0208 "japanese.X/jiskan16.bdf" 0) ; JISX0208.1983 (japanese-jisx0213-1 "Japanese.X/jiskan16-2000-1.bdf" 0) ; JISX0213-2000(Plane 1) * Mule-UCS が必要です (japanese-jisx0213-2 "Japanese.X/jiskan16-2000-2.bdf" 0) ; JISX0213-2000(Plane 2) * Mule-UCS が必要です ;; (korean-ksc5601 "Korean.X/hanglm16.bdf" 0) ; KSC5601 mincho * ↓どちらかをコメントアウト (korean-ksc5601 "Korean.X/hanglg16.bdf" 0) ; KSC5601 gothic * ↑どちらかをコメントアウト (chinese-gb2312 "Chinese.X/gb16fs.bdf" 0 ) ; GB2312 ??? (chinese-cns11643-1 "Chinese/cns1-16.bdf" 0) ; CNS11643.1992-1 (chinese-cns11643-2 "Chinese/cns2-16.bdf" 0) ; CNS11643.1992-2 (chinese-cns11643-3 "Chinese/cns3-16.bdf" 0) ; CNS11643.1992-3 (chinese-cns11643-4 "Chinese/cns4-16.bdf" 0) ; CNS11643.1992-4 (chinese-cns11643-5 "Chinese/cns5-16.bdf" 0) ; CNS11643.1992-5 (chinese-cns11643-6 "Chinese/cns6-16.bdf" 0) ; CNS11643.1992-6 (chinese-cns11643-7 "Chinese/cns7-16.bdf" 0) ; CNS11643.1992-7 (chinese-big5-1 "Chinese/taipei16.bdf" encode-big5-font) ; Big5 (chinese-big5-2 "Chinese/taipei16.bdf" encode-big5-font) ; Big5 (chinese-sisheng "Chinese/sish16-etl.bdf" 0) ; sisheng_cwnn ??? (vietnamese-viscii-lower "Asian/visc16-etl.bdf" encode-viscii-font) ; VISCII1.1 (vietnamese-viscii-upper "Asian/visc16-etl.bdf" encode-viscii-font) ; VISCII1.1 (arabic-digit "Misc/arab16-0-etl.bdf" 0) ; MuleArabic-0 (arabic-1-column "Misc/arab16-1-etl.bdf" 0) ; MuleArabic-1 (arabic-2-column "Misc/arab16-2-etl.bdf" 0) ; MuleArabic-2 (ipa "Misc/ipa16-etl.bdf" 1) ; MuleIPA (ethiopic "Ethiopic/ethio16f-uni.bdf" encode-ethio-font) ; Ethiopic-Unicode ;; (ascii-right-to-left "European/lt1-16-etl.bdf" 0) ; ISO8859-1 ;; ??? (indian-is13194 "Asian/isci16-mule.bdf" 0) ; IS13194-Devanagari (indian-2-column "Asian/ind16-mule.bdf" 0) ; MuleIndian-2 (indian-1-column "Asian/ind1c16-mule.bdf" 0) ; MuleIndian-1 (lao "Asian/lao16-mule.bdf" 1) ; MuleLao-1 (tibetan "Asian/tib16-mule.bdf" 0) ; MuleTibetan-0 (tibetan-1-column "Asian/tib1c16-mule.bdf" 0) ; MuleTibetan-1 ) ) (defun w32-configure-bdf-font (fontset) (new-fontset fontset (mapcar (lambda (x) (let* ((charset (car x)) (filename (nth 1 x)) (encoding (nth 2 x)) (fontname (concat bdf-font-name-prefix (symbol-name charset) ) ) ) (w32-auto-regist-bdf-font fontname (expand-file-name filename bdf-font-directory) encoding) (cons charset fontname))) bdf-font-file-alist) )) (w32-configure-bdf-font "bdf-fontset") ;; bold, italic, bold itaric を追加。 ;; Bold (w32-change-font-logfont "bdffont16-ascii" 1 (list 'bdf-font (expand-file-name "European/lt1-16b-etl.bdf" bdf-font-directory )) ) ;; italic (w32-change-font-logfont "bdffont16-ascii" 2 (list 'bdf-font (expand-file-name "European/lt1-16i-etl.bdf" bdf-font-directory )) ) ;; Bold itaric (w32-change-font-logfont "bdffont16-ascii" 3 (list 'bdf-font (expand-file-name "European/lt1-16bi-etl.bdf" bdf-font-directory )) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; 初期フレームの設定 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (setq default-frame-alist (append (list '(foreground-color . "#552800") '(background-color . "#FFFAF0") '(border-color . "black") '(mouse-color . "white") '(cursor-type . "box") '(cursor-height . 4) ;; 高さ '(cursor-color . "black") '(ime-font . "Nihongo-19");; TrueType のみ '(font . "bdf-fontset") ;; BDF ;; '(font . "small-fontset");; TrueType '(menu-bar-lines . 0) ;; メニューバー非表示 '(width . 126) '(height . 45) '(top . 22) '(left . -3) ) default-frame-alist) ) ;;; argument-editing の設定 (require 'mw32script) (mw32script-init) ;; ;;; browse-url の設定 ;; (require 'browse-url) ;; (global-set-key [S-mouse-2] 'browse-url-at-mouse) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; 印刷の設定 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; この設定で M-x print-buffer RET などでの印刷ができるようになります ;; ;; notepad に与えるパラメータの形式の設定 (define-process-argument-editing "notepad" (lambda (x) (general-process-argument-editing-function x nil t)) ) (defun w32-print-region (start end &optional lpr-prog delete-text buf display &rest rest) (interactive) (let ((tmpfile (expand-file-name (make-temp-name "w32-print-") temporary-file-directory) ) (coding-system-for-write w32-system-coding-system) ) (write-region start end tmpfile nil 'nomsg) (call-process "notepad" nil nil nil "/p" tmpfile) (and (file-writable-p tmpfile) (delete-file tmpfile)) ) ) (setq print-region-function 'w32-print-region) (custom-set-variables '(user-mail-address "sufic@csc.jp" t) '(query-user-mail-address nil)) (custom-set-faces) ;;; ;;; end of file ;;;