;;新しく開かないようにします (defun dired-find-alternate-file () "In dired, visit this file or directory instead of the dired buffer." (interactive) (set-buffer-modified-p nil) (find-alternate-file (dired-get-filename))) (add-hook 'dired-load-hook '(lambda () (load-library "ls-lisp") (setq ls-lisp-dirs-first t) (setq dired-listing-switches "-AFl") (setq find-ls-option '("-exec ls -AFGl {} \\;" . "-AFGl")) (setq grep-find-command "find . -type f -print0 | xargs -0 -e grep -ns ") (require 'wdired) )) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; shell mode ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; コンソールと同様、プロンプトは最下部にあってほしい (add-hook 'shell-mode-hook '(lambda () (setq comint-scroll-show-maximum-output t))) (modify-coding-system-alist 'process "telnet" '(japanese-shift-jis-dos . japanese-shift-jis-dos)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; C-z でキーバインドを拡張する (global-unset-key "\C-z") ;(global-set-key "\C-z\C-l" 'japanese-hankaku-region) ;(global-set-key "\C-z\C-u" 'japanese-zenkaku-region) ;; C-z で、キーボードマクロを実行 (global-set-key "\C-z" 'call-last-kbd-macro) ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; C-k でキーバインドを拡張する (define-prefix-command 'Control-K-prefix) (global-set-key '"\C-k" 'Control-K-prefix) (define-key Control-K-prefix "\C-k" 'kill-line) (define-key Control-K-prefix "\C-l" 'japanese-hankaku-region) (define-key Control-K-prefix "\C-u" 'japanese-zenkaku-region) (define-key Control-K-prefix "\C-i" 'get-1word-to-kill-ring) (defun my-yank () "kill-ring から要素を取りだしてペーストし、 次のペーストではその前のものが出るようにします。" (interactive) (yank) (rotate-yank-pointer 1) ) (define-key Control-K-prefix "\C-y" 'my-yank) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;● 複数回分の バックアップファイルが欲しい。 ;(setq version-control t) ; (setq kept-old-versions 1) ; (setq kept-new-versions 2) ; (setq trim-versions-without-asking t) ;;; バッファを渡り歩く (defun other-window-backward( &optional n ) "Select Nth previous window." (interactive "P" ) (other-window ( - (prefix-numeric-value n )))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; C-h でバックスペースに ヘルプは、M-h (global-set-key "\C-h" 'backward-delete-char) (global-set-key "\M-h" 'backward-kill-word) (global-set-key [f1] 'help-for-help) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; F2 で、guidance.red を開く (defun edit-my-document () "edit my document" (interactive ()) (find-file "c:/utl/guidance.red")) ;;; これはこれで動いている (defun edit-point-document () "edit point document" (interactive ()) ;;;(find-file (lookup-current-word))) (find-file (google-current-word))) (global-set-key [f2] 'edit-point-document) (autoload 'mot-mode "mot-mode" nil t) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; **** keisen-mule.el **** (if (or (boundp 'MULE) (featurep 'meadow)) (if window-system (autoload 'keisen-mode "keisen-mouse" "MULE版罫線モード+マウス" t)) (autoload 'keisen-mode "keisen-mule" "MULE版罫線モード" t)) ;; 以下、ufm というファイラーの設定 ;(1) リターンキーとして認識されるキーを設定してください。[RET] かも知れません。 (setq Ic-return-key [return]) ;(2)(autoload 'Ufm "Ic-Ufm")でも良い:キーバインドはその後で設定してね (autoload 'Ufm "Ic-Ufm") ;(3)サンプルマクロ(かなり適当に作りました) (setq Ufm-f2-file "~/Ufm-f2.macro") ;(4)環境ファイル (setq Ufm-env-file "~/Ufm-env" ) ;(5)f5 キーで起動するようにします (global-set-key [f5] 'Ufm) ;(6)キーバインドはこのように変更してください (add-hook 'Ufm-hook (lambda () (define-key Ufm-map [(meta h)] 'Ufm-up ) ; Alt + h でディレクトリを上がる (define-key Ufm-map [(meta j)] 'Ufm-return ) ; Alt + j で閲覧する (define-key Ufm-map [(hyper ? )] 'Ufm-dir-menu ) ; Hyper + SPACE でディレクトリジャンプする (define-key Ufm-map [f6] (lambda ()(Ufm-macro "%TAGS" ; テクニカルな関数の登録(分かる人は分かるかも) (lambda (s)(setq Ic-keep-buffer (progn (w3-open-local (car s))(current-buffer)))(Ufm-quit))))) )) ;(7)お好みに応じて(ファイル名補完で Ufm が立ち上がる様になります) ;(define-key minibuffer-local-completion-map [tab] 'complate-filenamae) ;(8) Meadowの時には Cygwin を導入しないとファイルの削除も満足に出来ません。適当に設定してください。 ; (setq exec-path (append (list "c:/meadow/2.00b2/bin" )exec-path)) (setq exec-path (append (list "c:/cygwin/usr/bin" )exec-path)) (setq exec-path (append (list "c:/cygwin/bin" )exec-path)) ;ちなみに、ここには環境変数PATHも通しておかなければなりません。(find 等で使用) ;win2000 では、「システムのプロパティ」の「詳細」に「環境変数」があるので、Pathに設定します。 ;;------- 以上、ファイラーの設定 (load-library "simple-ufunc") (load-library "misc-uz") (load-library "Ic-Um4") ;; 最終行から カーソル移動での新規行を禁止する。 (setq next-line-add-newlines nil) ;;;対応するかっこをハイライト表示。 (show-paren-mode t) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; 日本語インクリメンタルサーチ (define-key isearch-mode-map "\C-k" 'isearch-edit-string) ;; isearch ですぐにハイライトする (setq isearch-lazy-highlight-initial-delay 0) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; C-, C-. で、ポイント位置の変化しないスクロール (defun scroll-up-one-line () (interactive) (scroll-up 1) (next-line 1 ) ) (defun scroll-down-one-line () (interactive) (scroll-down 1) (previous-line 1 )) (global-set-key [?\C-,] 'scroll-up-one-line) (global-set-key [?\C-.] 'scroll-down-one-line) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; F3 キーで、ポイントのある1ワードを kill-ring にセーブする (defun get-1word-to-kill-ring() (interactive) (save-excursion (kill-new (buffer-substring (point) (progn (forward-word 1) (point)))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; serch-ring の内容をポイントに挿入する (defun yank-serch-word-to-curpnt() (interactive) (insert (car (or search-ring-yank-pointer search-ring)))) (global-set-key [f4] 'yank-serch-word-to-curpnt) (defun tera-isearch-forward-regexp() (interactive ) (isearch-forward-regexp (concat "\\b" (car (or search-ring-yank-pointer search-ring)) "\\b"))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; grep (setq grep-program "bgrep") (setq grep-command (format "%s -ino " grep-program)) (setq grep-find-command (format "%s -inod " grep-program)) ;;(setq grep-find-command (format "find . -type f -print0 | xargs -0 %s" grep-command)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; yank が便利になる browse-yank.el (autoload 'browse-yank "browse-yank" nil t) (global-set-key "\C-x\C-y" 'browse-yank) ; C-x C-y に割り当てる ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; hilight region(リージョンをハイライト表示) (transient-mark-mode 1) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ステータスラインに時間を表示する (display-time) ;; ******************************************************** ;; ;; goo 辞書 ;; ******************************************************** ;; (defun goo-dictionary (str) (interactive (list (read-string "infoseek jisyo: " (google-current-word)))) (browse-url (concat "http://dictionary.goo.ne.jp/search.php?MT=" (replace-in-string (google-encoding str) " +" "+") "&kind=&mode=0"))) ;; ******************************************************** ;; ;; ポイント位置を google検索する。 ;; ******************************************************** ;; ; Super-g でカーソル近くの keyword を google で検索 (defun google (str option) (browse-url (concat "http://www.google.com/search?q=" (replace-in-string (google-encoding str) " +" "+") "&num=100" option ))) (defun google-ja (str &optional module) (interactive (list (read-string "Google search: " (google-current-word)))) (google str "&hl=ja&lr=lang_ja")) (defun google-all (str &optional module) (interactive (list (read-string "Google search: " (google-current-word)))) (google str "")) (define-key global-map [(super g)] 'google-all) (defvar google-current-word-max-region-size 20 "*検索単語を拾うとき、regionからの切り出しを行なう最大のサイズ。 検索単語をバッファから拾うときに、regionのサイズがこの値以下なら regionの文字列を、それ以上なら`lookup-current-word'を使用する。") ;; 検索単語を拾う (defun google-current-word () (let ((region-size (abs (- (point) (mark))))) (if (and (not (zerop region-size)) (< region-size google-current-word-max-region-size)) (buffer-substring (point) (mark)) (lookup-current-word)))) (require 'browse-url) (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))) (autoload 'lookup-current-word "lookup-utils") ;;__________________________________________________________________________ ;;;;;; replace-in-string ;;Modified from XEmacs: lisp/prim/subr.el string() changed to char-to-string() (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)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; C-; で、半角カナを全角カナにする (defun zenkaku-katakana-region (min max) (interactive "r") (save-excursion (goto-char min) (while (re-search-forward "\\ck+" max t) (japanese-zenkaku-region (match-beginning 0) (match-end 0))))) (defun zenkaku-katakana-buffer () (interactive) (zenkaku-katakana-region (point-min) (point-max))) (defun zenkaku-katakana-at-point (&optional point) (interactive) (setq point (or point (point))) (when (looking-at "\\ck+") (forward-char 1) (backward-word 1) (re-search-forward "\\ck+") (zenkaku-katakana-region (match-beginning 0) (match-end 0)))) (global-set-key [?\C-;] 'zenkaku-katakana-at-point) ;; (global-set-key [?\C-.] 'scroll-down-one-line) ;; mini buffer や kill-ring 等の履歴を次回起動時に持ち越したい ;; session.el をもらってきて、以下のコードを追加 ;;(when (require 'session nil t) ;; (setq session-initialize '(de-saveplace session keys menus) ;; session-globals-include '((kill-ring 50) ;; (session-file-alist 100 t) ;; (file-name-history 100))) ;; (add-hook 'after-init-hook 'session-initialize)) (require 'session) (add-hook 'after-init-hook 'session-initialize) ;; history から重複したのを消す (require 'cl) (defun minibuffer-delete-duplicate () (let (list) (dolist (elt (symbol-value minibuffer-history-variable)) (unless (member elt list) (push elt list))) (set minibuffer-history-variable (nreverse list)))) (add-hook 'minibuffer-setup-hook 'minibuffer-delete-duplicate) ;; kill-ring に同じ内容の文字列を複数入れない (defadvice kill-new (before ys:no-kill-new-duplicates activate) (setq kill-ring (delete (ad-get-arg 0) kill-ring))) ;;save-buffer 時、buffer 末尾に空行が常にあるように (setq require-final-newline t) ;;置換をリージョン指定可能にしたい (defadvice query-replace (around ys:qr-region) (if (and transient-mark-mode mark-active) (save-restriction (narrow-to-region (region-beginning) (region-end)) ad-do-return) ad-do-return)) (defadvice query-replace-regexp (around ys:qrr-region) (if (and transient-mark-mode mark-active) (save-restriction (narrow-to-region (region-beginning) (region-end)) ad-do-return) ad-do-return)) (ad-enable-advice 'query-replace 'around 'ys:qr-region) (ad-enable-advice 'query-replace-regexp 'around 'ys:qrr-region) ;;mini buffer の大きさを可変にする(Meadow 2.10 では最初から可変 ;;(resize-mini-windows t) ;; ミニバッファを isearch C-r (require 'minibuf-isearch) ;;インテリジェント補完コマンド ac-mode ;;(autoload 'ac-mode "ac-mode" "Minor mode for advanced completion." t nil) ;;特定のメジャーモード以外でつねに ac-mode を on にする(うまく動いていない) ;;(setq ac-mode-exception '(dired-mode hex-mode)) ;;(add-hook 'find-file-hooks 'ac-mode-without-exception) ;;(add-hook 'text-mode-hook 'ac-mode-on) ;;(add-hook 'c-mode-hook 'ac-mode-on) ;; ;(defun tera-isearch-forward-regexp() ;; ; (isearch-forward-regexp ;; ; (concat "\\b" (car (or search-ring-yank-pointer search-ring)) "\\b"))) ;; (global-set-key [f9] 'tera-isearch-forward-regexp) (setq tab-stop-list'(4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68)) ;;これで,リージョンを選択し,M-x my-check-encode-ableとすると, ;;保存できない文字を順番に置換か削除していくことができます. ;;バッファ全体は C-x h M-x my-check-encode-able でできます. ;; (defun my-check-encode-able (beg end) ;; (interactive "r") ;; (save-excursion ;; (let* ( ;; (mycodingsystem buffer-file-coding-system) ;; mychar ;; mycharname ;; (mycount 0) ;; ;;;encoding に対応する charset のリストを取得する。 ;; ;;;Meadow2 (Emacs21) でも動くかどうか未確認 ;; ;;;うまくいかなければ、自分で対応を定義すれば良い ;; (mycharsetlist (coding-system-get mycodingsystem 'safe-charsets)) ;; ) ;; (goto-char beg) ;;;リージョンの先頭に移動 ;; (while (< (point) end) ;;;リージョン内を順に調べる ;; (setq mychar (following-char)) ;; (setq mycharsetname (char-charset mychar)) ;; ;;合成文字に対する処理。 Meadow2 (Emacs21) では不要かも???? ;; (if (equal 'composition mycharsetname) ;; (setq mycharsetname ;; (char-charset (string-to-char ;; (decompose-string (char-to-string mychar)))))) ;; ;;encode できない文字だったら色をつける ;; (if (or (equal mycharsetlist t) (member mycharsetname mycharsetlist)) ;; nil ;;;encode できる時は何もしない。 encode できない時↓ ;; (overlay-put (make-overlay (point) (1+ (point))) 'face 'region) ;; (setq mycount (1+ mycount))) ;; (forward-char) ;;;次の文字へ ;; ) ;; ;;結果の表示 ;; (if (< 0 mycount) ;; (message "%s で encode できない文字が%d 個ありました。" ;; mycodingsystem mycount)) ;; (if transient-mark-mode ;; (setq deactivate-mark t)) ;;;region を色つけしている時、色を解除 ;; ))) (defun my-check-encode-able (beg end) (interactive "r") (save-excursion (let* ( (mycodingsystem buffer-file-coding-system) mychar mycharname (mycount 0) ;;;encoding に対応する charset のリストを取得する。 ;;;Meadow2 (Emacs21) でも動くかどうか未確認 ;;;うまくいかなければ、自分で対応を定義すれば良い (mycharsetlist (coding-system-get mycodingsystem 'safe-charsets)) ) (goto-char beg) ;;;リージョンの先頭に移動 (while (< (point) end) ;;;リージョン内を順に調べる (setq mychar (following-char)) (setq mycharsetname (char-charset mychar)) ;;合成文字に対する処理。 Meadow2 (Emacs21) では不要かも???? (if (equal 'composition mycharsetname) (setq mycharsetname (char-charset (string-to-char (decompose-string (char-to-string mychar)))))) ;;encode できない文字だったら色をつける (if (or (equal mycharsetlist t) (member mycharsetname mycharsetlist)) nil ;;;encode できる時は何もしない。 encode できない時↓ (if (y-or-n-p (format "Delete %s?" (buffer-substring-no-properties (point) (1+ (point))))) (delete-region (point) (1+ (point))) (delete-region (point) (1+ (point))) (insert (read-from-minibuffer "Replace String: ")) (setq mycount (1+ mycount)))) (forward-char) ;;;次の文字へ ) ;;結果の表示 (if (< 0 mycount) (message "%s で encode できない文字が%d 個ありました。" mycodingsystem mycount)) ))) ;;(when (locate-library "izonmoji-mode") ;; (autoload 'izonmoji-mode "izonmoji-mode" nil t) ;; (autoload 'izonmoji-mode-on "izonmoji-mode" nil t) ;; (add-hook 'w3m-mode-hook 'izonmoji-mode-on) ;; (add-hook 'wl-message-redisplay-hook 'izonmoji-mode-on)) (require 'izonmoji-mode) ;;(add-hook 'mew-message-mode-hook 'izonmoji-mode-on) (add-hook 'text-mode-hook 'izonmoji-mode-on) ;; dired でディレクトリを先頭に表示 (setq ls-lisp-dirs-first t) ;; バックアップファイルの作成場所を固定 (setq make-backup-files t) (setq backup-directory-alist (cons (cons "\\.*$" (expand-file-name "c:/temp")) backup-directory-alist)) ;;etags でのみ大文字,小文字を区別する (setq tags-case-fold-search nil) ;; --------- 以下、危ない設定。 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; 全てのファイルを MS-DOS 形式として読込む ;;(setq coding-system-for-read 'japanese-shift-jis-dos) ;;(set-default-file-coding-systems *sjis*) ;;(set-default-coding-systems 'japanese-shift-jis-dos) ;;(set-default-file-coding-systems 'japanese-shift-jis-dos) ;;これが一番いいようだ (setq-default buffer-file-coding-system 'japanese-shift-jis-dos) ;;nifty のログは coding-system を自動決定できないようなので、このようにする (modify-coding-system-alist 'file "\\.*.log$" 'japanese-shift-jis) ;; meadow -batch -f batch-byte-compile *.el ;; のようにコマンドラインからバイトコンパイルすることもできます. ;; backtrace signaling (setq debug-on-error nil) (global-set-key "\C-x\C-b" 'electric-buffer-list) (put 'narrow-to-region 'disabled nil) ;;--------------------------------------------------------- ;; C-,, C-.でバッファを切り替え ;;--------------------------------------------------------- (defun my-select-visible (blst n) (let ((buf (nth n blst))) (cond ((= n (- (length blst) 1)) (other-buffer)) ((not (= (aref (buffer-name buf) 0) ? )) buf) (t (my-select-visible blst (+ n 1)))))) (defun my-grub-buffer () (interactive) (switch-to-buffer (my-select-visible (reverse (cdr (assq 'buffer-list (frame-parameters)))) 0))) (global-set-key [f12] 'my-grub-buffer) (global-set-key [f11] 'bury-buffer) ;;--------------------------------------------------------- ;; ;;--------------------------------------------------------- (defun diff-with-original (ediff) "Examin diff of current buffer with original file. If with prefix, do interactive merge using `ediff-with-original'. " (interactive "P") (if ediff (ediff-with-original) ;; simple diff view with diff-mode (require 'ediff) (let ((diff-buf (get-buffer-create (format "*diff %s*" (buffer-file-name)))) (ediff-diff-options "-u") ;; is it your favourite? (tmpfile (ediff-make-temp-file (current-buffer)))) (save-excursion (set-buffer diff-buf) (setq buffer-read-only nil) (buffer-disable-undo) (erase-buffer)) (ediff-make-diff2-buffer diff-buf (buffer-file-name) tmpfile) (delete-file tmpfile) (set-buffer diff-buf) (if (< (buffer-size) 1) (message "No differences with original file.") (condition-case nil (progn (require 'diff-mode) (diff-mode)) (error)) (goto-char 1) (pop-to-buffer diff-buf))))) ;;--------------------------------------------------------- ;; 編集中のファイルと保存してあるファイルの diff をとる ;;--------------------------------------------------------- (defun ediff-with-original () (interactive) ;; interactive merge using ediff (let ((file buffer-file-name) (buf (current-buffer)) (orig-buf (get-buffer-create (concat "*orig " buffer-file-name "*")))) (set-buffer orig-buf) (setq buffer-read-only nil) (buffer-disable-undo) (erase-buffer) (insert-file file) (setq buffer-read-only t) (set-buffer-modified-p nil) (ediff-buffers orig-buf buf))) ;;; タブと改行前の空白と全角空白を表示 (defface my-face-b-1 '((t (:background "gray90"))) nil) (defface my-face-b-2 '((t (:background "beige"))) nil) (defface my-face-u-1 '((t (:foreground "chocolate" :underline t))) nil) (defvar my-face-b-1 'my-face-b-1) (defvar my-face-b-2 'my-face-b-2) (defvar my-face-u-1 'my-face-u-1) (defadvice font-lock-mode (before my-font-lock-mode ()) (font-lock-add-keywords major-mode '( ;;("\t" 0 my-face-b-2 append) ;;(" " 0 my-face-b-1 append) ("[ \t]+$" 0 my-face-u-1 append) ))) (ad-enable-advice 'font-lock-mode 'before 'my-font-lock-mode) (ad-activate 'font-lock-mode) ;;; カーソル行のHighlight/underline (M-x hl-line-mode) (load "hl-line") (setq hl-line-face 'underline) ;;; IMEの設定 (mw32-ime-initialize) (setq default-input-method "MW32-IME") (setq-default mw32-ime-mode-line-state-indicator "[--]") (setq mw32-ime-mode-line-state-indicator-list '("[--]" "[あ]" "[--]")) (add-hook 'mw32-ime-on-hook (function (lambda () (set-cursor-height 2)))) (add-hook 'mw32-ime-off-hook (function (lambda () (set-cursor-height 4)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; マウスカーソルを消す設定 (setq w32-hide-mouse-on-key t) (setq w32-hide-mouse-timeout 5000) ;;; font-lockの設定 (if window-system (progn (setq font-lock-support-mode 'lazy-lock-mode) (global-font-lock-mode t))) ;;find file at point(C-x C-f でカーソル付近のファイルをデフォルトで入力) (ffap-bindings) ;;ツールバーはいらない (tool-bar-mode 0) ;; 起動時の画面はいらない (setq inhibit-startup-message t) ;;shift + カーソルキーで分割したウィンドウが移動 (windmove-default-keybindings) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; 16dot フォント (w32-add-font "shinonome16-fontset" '( (strict-spec ((:char-spec ascii :height any) (bdf-font "c:/meadow/fonts/shnm8x16a.bdf")) ;; normal ((:char-spec ascii :height any :weight bold) (bdf-font "c:/meadow/fonts/shnm8x16ab.bdf")) ;;bold ((:char-spec ascii :height any :weight any :slant italic) (bdf-font "c:/meadow/fonts/shnm8x16ai.bdf")) ;; normal ((:char-spec ascii :weight bold :slant italic) (bdf-font "c:/meadow/fonts/shnm8x16abi.bdf") ) ((:char-spec katakana-jisx0201 :height any) (bdf-font "c:/meadow/fonts/shnm8x16r.bdf") ((encoding . 1-byte-set-msb)) ) ((:char-spec katakana-jisx0201 :height any :weight bold) (bdf-font "c:/meadow/fonts/shnm8x16rb.bdf") ((encoding . 1-byte-set-msb)) ) ((:char-spec katakana-jisx0201 :height any :weight normal) (bdf-font "c:/meadow/fonts/shnm8x16ri.bdf") ((encoding . 1-byte-set-msb)) ) ((:char-spec katakana-jisx0201 :weight bold :slant italic) (bdf-font "c:/meadow/fonts/shnm8x16rbi.bdf") ((encoding . 1-byte-set-msb)) ) ((:char-spec latin-jisx0201 :height any) (bdf-font "c:/meadow/fonts/shnm8x16r.bdf") ) ((:char-spec latin-jisx0201 :height any :weight bold) (bdf-font "c:/meadow/fonts/shnm8x16rb.bdf") ) ((:char-spec latin-jisx0201 :height any :weight normal) (bdf-font "c:/meadow/fonts/shnm8x16ri.bdf") ) ((:char-spec latin-jisx0201 :weight bold :slant italic) (bdf-font "c:/meadow/fonts/shnm8x16rbi.bdf") ) ((:char-spec japanese-jisx0212 :height any :weight any :slant any) (bdf-font "c:/meadow/fonts/shnm8x16r") ((encoding-type . 0) (dim . 2))) ((:char-spec japanese-jisx0212 :height any :weight any :slant any) (bdf-font "c:/meadow/fonts/shnm8x16r") ((encoding-type . 0) (dim . 2))) ((:char-spec japanese-jisx0208-1978 :height any :weight any :slant any) (bdf-font "c:/meadow/fonts/shnm8x16r") ((encoding-type . 0) (dim . 2))) ((:char-spec japanese-jisx0208 :height any) (bdf-font "c:/meadow/fonts/shnmk16.bdf") ) ((:char-spec japanese-jisx0208 :height any :weight bold) (bdf-font "c:/meadow/fonts/shnmk16b.bdf") ) ((:char-spec japanese-jisx0208 :height any :weight normal) (bdf-font "c:/meadow/fonts/shnmk16i.bdf") ) ((:char-spec japanese-jisx0208 :weight bold :slant italic) (bdf-font "c:/meadow/fonts/shnmk16bi.bdf") ) ((:char-spec latin-iso8859-1 :height any) (bdf-font "c:/meadow/fonts/shnm8x16a.bdf") ((encoding . 1-byte-set-msb))) ((:char-spec latin-iso8859-1 :height any :weight bold) (bdf-font "c:/meadow/fonts/shnm8x16ab.bdf") ((encoding . 1-byte-set-msb))) ((:char-spec latin-iso8859-1 :height any :weight normal) (bdf-font "c:/meadow/fonts/shnm8x16a.bdf") ((encoding . 1-byte-set-msb))) ((:char-spec latin-iso8859-1 :weight bold :slant italic) (bdf-font "c:/meadow/fonts/shnm8x16a.bdf") ((encoding . 1-byte-set-msb))) ))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; 14dot フォント (w32-add-font "shinonome14-fontset" '( (strict-spec ((:char-spec ascii :height any) (bdf-font "c:/meadow/fonts/shnm7x14a.bdf")) ;; normal ((:char-spec ascii :height any :weight bold) (bdf-font "c:/meadow/fonts/shnm7x14ab.bdf")) ;;bold ((:char-spec ascii :height any :weight any :slant italic) (bdf-font "c:/meadow/fonts/shnm7x14ai.bdf")) ;; normal ((:char-spec ascii :weight bold :slant italic) (bdf-font "c:/meadow/fonts/shnm7x14abi.bdf") ) ((:char-spec katakana-jisx0201 :height any) (bdf-font "c:/meadow/fonts/shnm7x14r.bdf") ((encoding . 1-byte-set-msb)) ) ((:char-spec katakana-jisx0201 :height any :weight bold) (bdf-font "c:/meadow/fonts/shnm7x14rb.bdf") ((encoding . 1-byte-set-msb)) ) ((:char-spec katakana-jisx0201 :height any :weight normal) (bdf-font "c:/meadow/fonts/shnm7x14ri.bdf") ((encoding . 1-byte-set-msb)) ) ((:char-spec katakana-jisx0201 :weight bold :slant italic) (bdf-font "c:/meadow/fonts/shnm7x14rbi.bdf") ((encoding . 1-byte-set-msb)) ) ((:char-spec latin-jisx0201 :height any) (bdf-font "c:/meadow/fonts/shnm7x14r.bdf") ) ((:char-spec latin-jisx0201 :height any :weight bold) (bdf-font "c:/meadow/fonts/shnm7x14rb.bdf") ) ((:char-spec latin-jisx0201 :height any :weight normal) (bdf-font "c:/meadow/fonts/shnm7x14ri.bdf") ) ((:char-spec latin-jisx0201 :weight bold :slant italic) (bdf-font "c:/meadow/fonts/shnm7x14rbi.bdf") ) ((:char-spec japanese-jisx0212 :height any :weight any :slant any) (bdf-font "c:/meadow/fonts/shnm7x14r") ((encoding-type . 0) (dim . 2))) ((:char-spec japanese-jisx0212 :height any :weight any :slant any) (bdf-font "c:/meadow/fonts/shnm7x14r") ((encoding-type . 0) (dim . 2))) ((:char-spec japanese-jisx0208-1978 :height any :weight any :slant any) (bdf-font "c:/meadow/fonts/shnm7x14r") ((encoding-type . 0) (dim . 2))) ((:char-spec japanese-jisx0208 :height any) (bdf-font "c:/meadow/fonts/shnmk14.bdf") ) ((:char-spec japanese-jisx0208 :height any :weight bold) (bdf-font "c:/meadow/fonts/shnmk14b.bdf") ) ((:char-spec japanese-jisx0208 :height any :weight normal) (bdf-font "c:/meadow/fonts/shnmk14i.bdf") ) ((:char-spec japanese-jisx0208 :weight bold :slant italic) (bdf-font "c:/meadow/fonts/shnmk14bi.bdf") ) ((:char-spec latin-iso8859-1 :height any) (bdf-font "c:/meadow/fonts/shnm7x14a.bdf") ((encoding . 1-byte-set-msb))) ((:char-spec latin-iso8859-1 :height any :weight bold) (bdf-font "c:/meadow/fonts/shnm7x14ab.bdf") ((encoding . 1-byte-set-msb))) ((:char-spec latin-iso8859-1 :height any :weight normal) (bdf-font "c:/meadow/fonts/shnm7x14a.bdf") ((encoding . 1-byte-set-msb))) ((:char-spec latin-iso8859-1 :weight bold :slant italic) (bdf-font "c:/meadow/fonts/shnm7x14a.bdf") ((encoding . 1-byte-set-msb))) ))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; 12dot フォント (w32-add-font "shinonome12-fontset" '( (strict-spec ((:char-spec ascii :height any) (bdf-font "c:/meadow/fonts/shnm6x12a.bdf")) ;; normal ((:char-spec ascii :height any :weight bold) (bdf-font "c:/meadow/fonts/shnm6x12ab.bdf")) ;;bold ((:char-spec ascii :height any :weight any :slant italic) (bdf-font "c:/meadow/fonts/shnm6x12ai.bdf")) ;; normal ((:char-spec ascii :weight bold :slant italic) (bdf-font "c:/meadow/fonts/shnm6x12abi.bdf") ) ((:char-spec katakana-jisx0201 :height any) (bdf-font "c:/meadow/fonts/shnm6x12r.bdf") ((encoding . 1-byte-set-msb)) ) ((:char-spec katakana-jisx0201 :height any :weight bold) (bdf-font "c:/meadow/fonts/shnm6x12rb.bdf") ((encoding . 1-byte-set-msb)) ) ((:char-spec katakana-jisx0201 :height any :weight normal) (bdf-font "c:/meadow/fonts/shnm6x12ri.bdf") ((encoding . 1-byte-set-msb)) ) ((:char-spec katakana-jisx0201 :weight bold :slant italic) (bdf-font "c:/meadow/fonts/shnm6x12rbi.bdf") ((encoding . 1-byte-set-msb)) ) ((:char-spec latin-jisx0201 :height any) (bdf-font "c:/meadow/fonts/shnm6x12r.bdf") ) ((:char-spec latin-jisx0201 :height any :weight bold) (bdf-font "c:/meadow/fonts/shnm6x12rb.bdf") ) ((:char-spec latin-jisx0201 :height any :weight normal) (bdf-font "c:/meadow/fonts/shnm6x12ri.bdf") ) ((:char-spec latin-jisx0201 :weight bold :slant italic) (bdf-font "c:/meadow/fonts/shnm6x12rbi.bdf") ) ((:char-spec japanese-jisx0212 :height any :weight any :slant any) (bdf-font "c:/meadow/fonts/shnm6x12r.bdf") ((encoding-type . 0) (dim . 2))) ((:char-spec japanese-jisx0212 :height any :weight any :slant any) (bdf-font "c:/meadow/fonts/shnm6x12r.bdf") ((encoding-type . 0) (dim . 2))) ((:char-spec japanese-jisx0208-1978 :height any :weight any :slant any) (bdf-font "c:/meadow/fonts/shnm6x12r.bdf") ((encoding-type . 0) (dim . 2))) ((:char-spec japanese-jisx0208 :height any) (bdf-font "c:/meadow/fonts/shnmk12.bdf") ) ((:char-spec japanese-jisx0208 :height any :weight bold) (bdf-font "c:/meadow/fonts/shnmk12b.bdf") ) ((:char-spec japanese-jisx0208 :height any :weight normal) (bdf-font "c:/meadow/fonts/shnmk12i.bdf") ) ((:char-spec japanese-jisx0208 :weight bold :slant italic) (bdf-font "c:/meadow/fonts/shnmk12bi.bdf") ) ((:char-spec latin-iso8859-1 :height any) (bdf-font "c:/meadow/fonts/shnm6x12a.bdf") ((encoding . 1-byte-set-msb))) ((:char-spec latin-iso8859-1 :height any :weight bold) (bdf-font "c:/meadow/fonts/shnm6x12ab.bdf") ((encoding . 1-byte-set-msb))) ((:char-spec latin-iso8859-1 :height any :weight normal) (bdf-font "c:/meadow/fonts/shnm6x12a.bdf") ((encoding . 1-byte-set-msb))) ((:char-spec latin-iso8859-1 :weight bold :slant italic) (bdf-font "c:/meadow/fonts/shnm6x12a.bdf") ((encoding . 1-byte-set-msb))) ))) (w32-add-font "shinonome10-fontset" '((strict-spec ((:char-spec ascii :height any) (bdf-font "c:/Meadow/fonts/5x10a.bdf")) ((:char-spec ascii :height any :weight bold) (bdf-font "c:/Meadow/fonts/5x10a.bdf")) ((:char-spec ascii :height any :slant italic) (bdf-font "c:/Meadow/fonts/5x10a.bdf")) ((:char-spec katakana-jisx0201 :height any) (bdf-font "c:/Meadow/fonts/5x10a.bdf") ((encoding-type . 0) (dim . 2))) ((:char-spec katakana-jisx0201 :height any :weight bold) (bdf-font "c:/Meadow/fonts/5x10a.bdf") ((encoding-type . 0) (dim . 2))) ((:char-spec latin-jisx0201 :height any) (bdf-font "c:/Meadow/fonts/5x10a.bdf") ((encoding-type . 0) (dim . 2))) ((:char-spec latin-jisx0201 :height any :weight bold) (bdf-font "c:/Meadow/fonts/5x10a.bdf") ((encoding-type . 0) (dim . 2))) ((:char-spec japanese-jisx0208 :height any) (bdf-font "c:/Meadow/fonts/knj10.bdf") ((encoding-type . 0) (dim . 2))) ((:char-spec japanese-jisx0208 :height any :weight bold) (bdf-font "c:/Meadow/fonts/knj10.bdf") ((encoding-type . 0) (dim . 2))) )))