source: projects/vskel/branches/vskel-20110223/.emacs21.el @ 1126

Revision 1126, 31.0 KB checked in by daisuke, 14 years ago (diff)

import vskel-4.1.0 from internal cvs repository

Line 
1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2;;  FSF Emacs 20/21 用 ユーザ設定ファイルのサンプル
3;;            MATSUBAYASHI 'Shaolin' Kohji (shaolin@vinelinux.org)
4;;                      modified by Jun Nishii <jun@vinelinux.org>
5;;                      modified by Daisuke SUZUKI <daisuke@vinelinux.org>
6;;            $Id: .emacs21.el,v 1.1 2009/04/20 18:32:24 daisuke Exp $
7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
8;;
9;;  システムのアップグレード時にこのファイルを自動的に更新したい場合は
10;;  このファイルを変更せずに .emacs.my.el に記述してください。
11
12
13;;; 初期設定ファイルの指定
14
15(setq user-init-file "~/.emacs.el")
16
17;;; マクロサーチパスの追加
18;;; ~/lib/emacs 以下にユーザ用の *.el, *.elc を置くことができます
19(setq load-path (append '("~/lib/emacs") load-path))
20
21;;; 言語環境の指定
22
23(set-language-environment "Japanese")
24
25;;; 漢字コードの設定
26
27(if (equal (getenv "LANG") "ja_JP.UTF-8")
28  (progn
29    (cond ((<= emacs-major-version 21)
30      (require 'un-define)))
31    (set-default-coding-systems 'utf-8)
32    (set-buffer-file-coding-system 'utf-8-unix)
33    (set-terminal-coding-system 'utf-8)
34    (set-keyboard-coding-system 'utf-8))
35    ;;; 日本語メニューバー (UTF-8のメニューバーを用意?)
36    ;(cond
37    ;  (and (>= emacs-major-version 21)
38    ;       (equal (substring (concat (getenv "LANG") "__") 0 2) "ja")
39    ;     (load "menu-tree-utf8")))
40  (progn
41    (set-default-coding-systems 'euc-jp)
42    (set-buffer-file-coding-system 'euc-jp-unix)
43    (set-terminal-coding-system 'euc-jp)
44    (set-keyboard-coding-system 'euc-jp)
45    ;;; 日本語メニューバー
46    (cond
47      ((and (>= emacs-major-version 21)
48           (equal (substring (concat (getenv "LANG") "__") 0 2) "ja"))
49         (load "menu-tree")))
50))
51
52;;; emacsclient サーバを起動
53(server-start)
54
55;; 環境変数 EMACS_IME を調べる。
56;; EMACS_IME がなければ scim を使用する
57
58(setq emacs-ime (getenv "EMACS_IME"))
59(if (null emacs-ime)
60    (setq emacs-ime "scim"))
61
62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
63;; X 版 Emacs のフォント/カラー設定
64;; .emacs-faces.el, .emacs-fontset.el 参照
65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
66
67(load "~/.emacs-faces.el")
68
69;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
70;; emacs-21 の設定
71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
72(cond
73 ((>= emacs-major-version 21)
74 
75 ;;; メニューバーを消す
76 ;(menu-bar-mode nil)
77 ;;; ツールバーを消す
78 ;(tool-bar-mode nil)
79 ;;; cursor の blink を止める
80 ;(blink-cursor-mode nil)
81 ;;; 表示の行間を拡げる
82 ;(set-default 'line-spacing 2)
83 ;;; active でない window の空 cursor を出さない
84 (setq cursor-in-non-selected-windows nil)
85 ;;; フォントのスケールをしない
86 (setq scalable-fonts-allowed nil)
87 ;;; [Home] Key と [End] Key を従来の動作に戻す
88 (define-key global-map [home] 'beginning-of-buffer)
89 (define-key global-map [end] 'end-of-buffer)
90
91 ;;; image.el における JPEG の判定基準を緩める
92 ;(eval-after-load "image"
93 ; '(setq image-type-regexps
94 ;   (cons (cons "^\377\330" 'jpeg) image-type-regexps)))
95
96 ;;; 表示の行間を拡げる
97 (setq line-spacing 2)
98
99))
100
101
102;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
103;; Egg (Wnn フロントエンド) の設定
104;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
105
106;; Wnn6/FreeWnn
107(if (or (equal emacs-ime "wnn")
108        (equal emacs-ime "Wnn")
109        (equal emacs-ime "wnn6")
110        (equal emacs-ime "Wnn6")
111        (equal emacs-ime "wnn8")
112        (equal emacs-ime "Wnn8"))
113    (progn
114      (if (>= emacs-major-version 21)
115
116      (progn
117
118         ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
119         ;;emacs-dl-wnnでないときの設定( emacs-21 + tamago v4)
120
121         (global-set-key "\C-\\" 'toggle-input-method)
122         ;; Shift-Space または 半角/全角 でも起動
123         (global-set-key [?\S-\ ] 'toggle-input-method)
124         (global-set-key [zenkaku-hankaku] 'toggle-input-method)
125         (load "egg")
126         
127         ;; InputMethod の設定
128         ;; emacs 起動時 ASCII
129         ;;(setq default-input-method "japanese-egg-wnn")
130         ;; emacs 起動時から日本語入力
131         (set-input-method "japanese-egg-wnn")
132         
133         ;; jserverの指定
134         ;; jserver のリストを次の様にして指定できます
135         ;;(setq jserver-list '("vanilla" "espresso"))
136         (setq jserver-list (list (getenv "JSERVER") "localhost"))
137
138
139         ;;--------------------------------------------------------
140         ;; tamago v4
141         ;;--------------------------------------------------------
142         ;; 全般
143         
144         ;;(setq egg-default-startup-file "eggrc-wnn") ; 95.6.1 by S.Tomura
145         (garbage-collect)
146         
147         ;; "nn" で「ん」を入力
148         (setq enable-double-n-syntax t)
149         
150         ;; "." で「.」、"," で「,」を入力。
151         (setq use-kuten-for-period nil)
152         (setq use-touten-for-comma nil)
153         
154         )
155       
156       ;; emacs-dl-wnn の場合 (emacs-20)
157       (progn
158         (autoload 'egg "egg" "Initialize EGG." t)
159         (egg)
160         (global-set-key "\C-\\" 'toggle-egg-mode)
161         (global-set-key [\S-\ ] 'toggle-egg-mode)
162         (define-key isearch-mode-map "\C-\\" 'isearch-fep-egg)
163         (autoload 'toggle-egg-mode "egg" "Initialize EGG." t)
164         (autoload 'isearch-fep-egg "isearch-ext"
165           "Read string for incremental search by using egg." t)
166         
167         (setq egg-default-startup-file "eggrc-wnn") ; 95.6.1 by S.Tomura
168         (garbage-collect)
169         
170         ;; jserver のリストを次の様にして指定できます
171         ;;(setq jserver-list '("vanilla" "espresso"))
172         (setq jserver-list (list (getenv "JSERVER") "localhost"))
173         
174         ;; "nn" で「ん」を入力
175         (setq enable-double-n-syntax t)
176         
177         ;; "." で「.」、"," で「,」を入力。
178         (setq use-kuten-for-period nil)
179         (setq use-touten-for-comma nil)
180         
181         ;; 1234567890%#%"' を「半角」で入力"
182         (let ((its:*defrule-verbose* nil))
183           (its-define-mode "roma-kana")
184           (dolist (symbol '("1" "2" "3" "4" "5"
185                             "6" "7" "8" "9" "0"
186                             "#" "%" "\"" "'" ))
187             (its-defrule symbol symbol)))
188         
189         )
190       )
191      )
192  )
193
194
195;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
196;; Wnn7Egg (Wnn7 フロントエンド) の設定
197;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
198
199(if (or (equal emacs-ime "wnn7")
200        (equal emacs-ime "Wnn7"))
201    (progn
202      (setq load-path (append '("/usr/share/wnn7/elisp/emacs20") load-path))
203      (global-set-key "\C-\\" 'toggle-input-method)
204      ;; Shift-Space または 半角/全角 でも起動
205      (global-set-key [?\S-\ ] 'toggle-input-method)
206      (global-set-key [zenkaku-hankaku] 'toggle-input-method)
207      ;; canna like toggle keybind
208      ;;(global-set-key "\C-o" 'toggle-input-method)
209      (load "wnn7egg-leim")
210      (set-input-method "japanese-egg-wnn7")
211      (set-language-info "Japanese" 'input-method "japanese-egg-wnn7")
212
213      ;; "nn" で「ん」を入力
214      (setq enable-double-n-syntax t)
215      ;; 候補選択モード
216      (egg-use-input-predict)
217      (setq egg-predict-realtime nil)
218      ;; インライン候補選択モード
219      (setq egg-predict-mode "inline")
220      ;; ウインドウ候補選択モード
221      ;(setq egg-predict-mode "window")
222
223      ;; 候補リスト表示
224      (define-key wnn7-henkan-mode-map " " 'wnn7-henkan-select-kouho-dai)
225
226      ;; 1234567890%#%"'/\| を「半角」で入力
227      (let ((its:*defrule-verbose* nil))
228        (its-define-mode "roma-kana")
229        (dolist (symbol '("1" "2" "3" "4" "5"
230                          "6" "7" "8" "9" "0"
231                          "#" "%" "\"" "'" "/" "\\" "|"))
232                (its-defrule symbol symbol)))
233    )
234)
235
236
237;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
238;; かんなの設定
239;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
240
241(if (or (equal emacs-ime "canna")
242        (equal emacs-ime "Canna")
243        (equal emacs-ime "canna-tamago"))
244
245    (progn
246    (if (and (or (and (boundp 'CANNA) CANNA)
247                 (<= emacs-major-version 20))
248             (not (equal emacs-ime "canna-tamago")))
249        (progn
250          ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
251          ;; emacs-dl-canna/emcws の場合
252         
253          (load-library "canna")
254         
255          ;; color-mate を使わないで、漢字変換に色を付けたい時に
256          ;(setq canna-use-color t)
257         
258          ;; フェンスモードでなくアンダーラインを使う
259          ;;(setq canna-with-fences nil)
260          ;;(setq canna-underline t)
261         
262          ;; Canna サーバの指定
263          (if (null (getenv "CANNA_SERVER"))
264              (setq canna-server "unix")
265            (setq canna-server (getenv "CANNA_SERVER")))
266          (canna)
267         
268          ;; Canna を Ctrl-\ で起動します。コメントアウトすれば、
269          ;; Ctrl-\ で skk が立ち上がります。
270          (global-set-key "\C-\\" 'canna-toggle-japanese-mode)
271          (global-set-key "\C-o" 'canna-toggle-japanese-mode)
272          ;; Shift-Space または 半角/全角 でも起動
273          (global-set-key [?\S-\ ] 'canna-toggle-japanese-mode)
274          (global-set-key [zenkaku-hankaku] 'canna-toggle-japanese-mode)
275         
276          (global-set-key "\C-_" 'canna-undo)  ;アンドゥの設定。
277          (setq canna-save-undo-text-predicate ;アンドゥバッファへ入れる条件
278                '(lambda (s) (> (length (car s)) 2)) )
279          (setq canna-undo-hook ;アンドゥ+α。
280                '(lambda () (message "再変換します....")                         
281                   (canna-do-function canna-func-henkan)) )
282         
283          ;;かんなの変換中に BS & DEL を使う
284          (define-key canna-mode-map [backspace] [?\C-h])
285          (define-key canna-mode-map [delete] [?\C-h])
286         
287          ;;かんなの変換中に C-h を使う (with term/keyswap)
288          (define-key canna-mode-map [?\177] [?\C-h])
289          ))
290 
291    (if (or (and (not (and (boundp 'CANNA) CANNA))
292                 (>= emacs-major-version 21))
293            (equal emacs-ime "canna-tamago"))
294        (progn
295        ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
296           ;; emacs-dl-canna/emcws でないとき (tamago4)
297           
298           ;; Canna サーバの指定
299           ;;(setq canna-hostname "unix/")
300
301           (require 'egg)
302           
303           ;; InputMethod の設定
304           (setq default-input-method "japanese-egg-canna")
305           
306           ;; tamago v4 共通設定
307           
308           (setq
309            ;; 何回変換すると(自動的に)辞書に反映するか
310            wnn-auto-save-dictionaries 1
311            ;; nil にすると、alphanumeric が半角入力になるらしい。
312            its-enable-fullwidth-alphabet nil
313            ;; Backspace で消すときに、かなを入力したローマ字に展開して
314            ;; ローマ字単位で消す?
315            its-delete-by-keystroke t
316            ;; 外すと操作方法が変わるみたいです。よく分かりません。
317            egg-mode-preference t
318            ;; "nn" で「ん」を入力
319            enable-double-n-syntax t
320            ;; "." で「.」、"," で「,」を入力。
321            use-kuten-for-period nil
322            use-touten-for-comma nil
323            ;; 候補の最後まで行ったら先頭に戻る
324            egg-conversion-wrap-select t
325            ;; 候補一覧を表示するまでの変換回数、0で非表示
326            egg-conversion-auto-candidate-menu 2)
327           
328           ;; F7 で toroku-region
329           (global-set-key [f7] 'egg-toroku-region)
330
331           ;; Canna 用設定 (Canna 風キー設定)
332           (load "its")
333           (define-key global-map "\C-o" 'toggle-input-method)
334           (global-set-key [?\S-\ ] 'toggle-input-method)
335           (global-set-key [zenkaku-hankaku] 'toggle-input-method)
336           (define-key isearch-mode-map "\C-o" 'isearch-toggle-input-method)
337           (define-key isearch-mode-map [?\S-\ ] 'isearch-toggle-input-method)
338           (define-key isearch-mode-map [zenkaku-hankaku] 'isearch-toggle-input-method)
339           (define-key its-mode-map "\C-h" 'its-delete-backward-SYL)
340           (define-key its-mode-map "\C-p" 'its-hiragana)
341           (define-key its-mode-map "\C-y" 'its-hiragana)
342           (define-key its-mode-map "\C-n" 'its-katakana)
343           (define-key its-mode-map [up] 'its-hiragana)
344           (define-key its-mode-map [down] 'its-katakana)
345           (define-key egg-conversion-map "\C-g" 'egg-abort-conversion)
346           (cond ((eq window-system 'x)
347                  (define-key its-mode-map [henkan] 'its-kick-convert-region)
348                  (define-key its-mode-map [hiragana-katakana] 'its-katakana)
349                  (define-key its-mode-map [muhenkan] 'its-hiragana)
350                  (define-key its-mode-map [f6] 'its-hiragana)
351                  (define-key its-mode-map [f7] 'its-katakana)
352                  (define-key its-mode-map [f8] 'its-half-width)
353                  (define-key its-mode-map [backspace] 'its-delete-backward-SYL)
354                  ;(define-key menudiag-mode-map [backspace] 'menudiag-exit-one-level)
355                  (define-key its-mode-map [delete] 'its-delete-SYL))
356                 ((null window-system)
357                  (define-key its-mode-map "\e[17~" 'its-hiragana)
358                  (define-key its-mode-map "\e[18~" 'its-katakana)
359                  (define-key its-mode-map "\e[19~" 'its-half-width)
360                  (define-key its-mode-map [8] 'its-delete-backward-SYL)
361                  ;(define-key menudiag-mode-map [8] 'menudiag-exit-one-level)
362                  (define-key its-mode-map "\e[3~" 'its-delete-SYL)))
363           )
364      )
365    )
366  )
367
368
369;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
370;; Atok for X の設定
371;;  IIIMP 経由で実行します
372;; (要 MULE-UCS, IIIMECF)
373;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
374(if (or (equal emacs-ime "atokx")
375        (equal emacs-ime "atokx2")
376        (equal emacs-ime "atokx3"))
377    (progn
378
379      (require 'un-define)     
380      (setq coding-category-utf-8 'utf-8)
381
382      (setq iiimcf-server-control-hostlist '("localhost"))
383      (setq iiimcf-server-control-default-language "ja")
384      (setq default-input-method 'iiim-server-control)
385      (require 'iiimcf-sc)
386
387      ;; 変換トグルの設定
388      (define-key global-map "\C-\\" 'toggle-input-method)
389      ;; Shift-Space または 半角/全角 でも起動
390      (global-set-key [?\S-\ ] 'toggle-input-method)
391      (global-set-key [zenkaku-hankaku] 'toggle-input-method)
392
393      ;;モードライン表示をすっきりと
394      ;;(setcar default-mode-line-format "")
395
396      )
397  )
398
399
400;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
401;; anthy.el の設定
402;; (詳しくは /usr/share/doc/anthy-*/doc/ELISP を参照してください)
403;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
404
405(if (or (equal emacs-ime "anthy-el")
406        (equal emacs-ime "Anthy-el"))
407    (progn
408      (require 'anthy)
409      ;; 変換開始キー
410      (define-key global-map "\C-\\" 'toggle-input-method)
411      (define-key global-map "\C-o" 'toggle-input-method)
412      (define-key global-map [kanji] 'toggle-input-method)
413      (define-key global-map [M-kanji] 'toggle-input-method)
414      (global-set-key [?\S-\ ] 'toggle-input-method)
415      (global-set-key [zenkaku-hankaku] 'toggle-input-method)
416     
417      ;; バックスペースでローマ字単位で消す
418      ;(anthy-set-break-into-roman 't)
419    )
420)
421
422;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
423;; tamago-anthy の設定
424;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
425
426(if (and (boundp 'input-method-alist)
427         (or (equal emacs-ime "scim")
428             (equal emacs-ime "SCIM")
429             (equal emacs-ime "anthy")
430             (equal emacs-ime "Anthy")
431             (equal emacs-ime "egg-anthy")
432             (equal emacs-ime "tamago-anthy"))
433         (assoc "japanese-egg-anthy" input-method-alist))
434    (progn
435           (require 'egg)
436           ;; InputMethod の設定
437           (setq default-input-method "japanese-egg-anthy")
438           
439           ;; tamago v4 共通設定
440           (setq
441            ;; 何回変換すると(自動的に)辞書に反映するか
442            wnn-auto-save-dictionaries 1
443            ;; nil にすると、alphanumeric が半角入力になるらしい。
444            its-enable-fullwidth-alphabet nil
445            ;; Backspace で消すときに、かなを入力したローマ字に展開して
446            ;; ローマ字単位で消す?
447            its-delete-by-keystroke t
448            ;; 外すと操作方法が変わるみたいです。よく分かりません。
449            egg-mode-preference t
450            ;; "nn" で「ん」を入力
451            enable-double-n-syntax t
452            ;; "." で「.」、"," で「,」を入力。
453            use-kuten-for-period nil
454            use-touten-for-comma nil
455            ;; 候補の最後まで行ったら先頭に戻る
456            egg-conversion-wrap-select t
457            ;; 候補一覧を表示するまでの変換回数、0で非表示
458            egg-conversion-auto-candidate-menu 2
459            ;; 不正なキーシーケンスを警告する
460            its-barf-on-invalid-keyseq t)
461           
462           ;; F7 で toroku-region
463           (global-set-key [f7] 'egg-toroku-region)
464
465           ;; egg-anthy.el
466           (add-hook 'anthy-load-hook '(lambda () (load "egg-anthy")))
467
468           (load "its")
469           (define-key global-map "\C-o" 'toggle-input-method)
470           (global-set-key [?\S-\ ] 'toggle-input-method)
471           (global-set-key [zenkaku-hankaku] 'toggle-input-method)
472           (define-key isearch-mode-map "\C-o" 'isearch-toggle-input-method)
473           (define-key isearch-mode-map [?\S-\ ] 'isearch-toggle-input-method)
474           (define-key isearch-mode-map [zenkaku-hankaku] 'isearch-toggle-input-method)
475           (define-key its-mode-map "\C-h" 'its-delete-backward-SYL)
476           (define-key its-mode-map "\C-p" 'its-hiragana)
477           (define-key its-mode-map "\C-y" 'its-hiragana)
478           (define-key its-mode-map "\C-n" 'its-katakana)
479           (define-key its-mode-map "\C-k" 'its-katakana)
480           (define-key its-mode-map [up] 'its-hiragana)
481           (define-key its-mode-map [down] 'its-katakana)
482           (define-key egg-conversion-map "\C-g" 'egg-abort-conversion)
483           (cond ((eq window-system 'x)
484                  (define-key its-mode-map [henkan] 'its-kick-convert-region)
485                  (define-key its-mode-map [hiragana-katakana] 'its-katakana)
486                  (define-key its-mode-map [muhenkan] 'its-hiragana)
487                  (define-key its-mode-map [f6] 'its-hiragana)
488                  (define-key its-mode-map [f7] 'its-katakana)
489                  (define-key its-mode-map [f8] 'its-half-width)
490                  (define-key its-mode-map [backspace] 'its-delete-backward-SYL)
491                  (define-key its-mode-map [delete] 'its-delete-SYL))
492                 ((null window-system)
493                  (define-key its-mode-map "\e[17~" 'its-hiragana)
494                  (define-key its-mode-map "\e[18~" 'its-katakana)
495                  (define-key its-mode-map "\e[19~" 'its-half-width)
496                  (define-key its-mode-map [8] 'its-delete-backward-SYL)
497                  (define-key its-mode-map "\e[3~" 'its-delete-SYL)))
498           )
499  )
500
501;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
502;; uim.el の設定
503;; (詳しくは /usr/share/doc/uim-el-*/README.ja を参照してください)
504;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
505
506(if (or (equal emacs-ime "uim")
507        (equal emacs-ime "UIM"))
508    (progn
509      (require 'uim)
510      ;; 変換開始キー
511      (global-set-key "\C-\\" 'uim-mode)
512      (global-set-key "\C-o" 'uim-mode)
513      (global-set-key [kanji] 'uim-mode)
514      (global-set-key [M-kanji] 'uim-mode)
515      (global-set-key [?\S-\ ] 'uim-mode)
516      (global-set-key [zenkaku-hankaku] 'uim-mode)
517
518      ;; Anthy の時はデフォルトでひらがな入力に
519      (setq uim-default-im-prop '("action_anthy_hiragana"
520                                  "action_canna_hiragana"
521                                  "action_skk_hiragana"))
522     
523      ;; 変換候補をデフォルトでインライン表示にする
524      ;(setq uim-candidate-display-inline t)
525    )
526)
527
528;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
529;; SKK-9.6m
530;;   Mule 上の仮名漢字変換システム SKK の設定
531;;   C-x t でチュートリアルが起動します
532;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
533
534;;;;;;;;;; 使用する辞書の設定 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
535
536;;; SKK-JISYO.L をメモリ上に読み込んで利用する場合
537(setq skk-large-jisyo "/usr/share/skk/SKK-JISYO.L")
538
539;;; SKK-JISYO.M をメモリ上に読み込み、
540;;; 見付からない場合は skkserv を起動して SKK-JISYO.L から検索する場合
541;;; (skkexdic パッケージが必要です)
542;;(setq skk-large-jisyo "/usr/share/skk/SKK-JISYO.M")
543;;(setq skk-aux-large-jisyo "/usr/share/skk/SKK-JISYO.L")
544;;(setq skk-server-portnum 1178)
545;;(setq skk-server-host "localhost")
546;;(setq skk-server-prog "/usr/libexec/skkserv")
547
548;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
549
550(global-set-key "\C-x\C-j" 'skk-mode)
551(global-set-key "\C-xj" 'skk-auto-fill-mode)
552(global-set-key "\C-xt" 'skk-tutorial)
553(autoload 'skk-mode "skk" nil t)
554(autoload 'skk-auto-fill-mode "skk" nil t)
555(autoload 'skk-tutorial "skk-tut" nil t)
556(autoload 'skk-isearch-mode-setup "skk-isearch" nil t)
557(autoload 'skk-isearch-mode-cleanup "skk-isearch" nil t)
558(add-hook 'isearch-mode-hook
559          (function (lambda ()
560                      (and (boundp 'skk-mode) skk-mode
561                           (skk-isearch-mode-setup) ))))
562(add-hook 'isearch-mode-end-hook
563          (function (lambda ()
564                      (and (boundp 'skk-mode) skk-mode
565                           (skk-isearch-mode-cleanup)
566                           (skk-set-cursor-color-properly) ))))
567
568;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
569;; T-Gnus 6.13.3 (参考)
570;;   NetNews リーダー GNUS (SEMI 対応版)
571;;   M-x gnus で起動します
572;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
573
574;; News Server 名やドメイン名を適切に指定してください
575;(setq gnus-nntp-server "news.hoge.hoge.or.jp")
576;(setq gnus-local-domain "hoge.hoge.or.jp")
577;(setq gnus-local-organization "HogeHoGe Org.")
578;(setq gnus-use-generic-from t)
579
580;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
581;; Mew 3.3  -  Messaging in the Emacs World
582;;   メールリーダー Mew
583;;   M-x mew で起動します
584;;
585;;   個人用の設定ファイルは ~/.mew.el を利用してください。
586;;   最新の .mew.el は /usr/share/doc/mew-common-*/vine.dot.mew にあります。
587;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
588
589(autoload 'mew "mew" nil t)
590(autoload 'mew-send "mew" nil t)
591
592(if (file-exists-p (expand-file-name "~/.mew.el"))
593    (load (expand-file-name "~/.mew.el") nil t nil))
594
595;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
596;; X-Face-Mule
597;;   Mew や Wanderlust などで、X-Face 画像つきのメッセージを表示します
598;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
599
600(if (and window-system (module-installed-p 'bitmap))
601    (progn
602      (require 'bitmap)
603      (require 'x-face-e21)
604      (mapcar (lambda (fontset)
605                (set-fontset-font
606                  fontset 'bitmap
607                  "-etl-fixed-medium-r-*--16-*-100-100-m-*-bitmap.8x16-0"))
608              (fontset-list))
609
610      ; for Wanderlust
611      (setq wl-highlight-x-face-function
612            'x-face-decode-message-header)
613
614      ; for Mew
615      (setq mew-use-highlight-x-face t)
616      (setq mew-use-highlight-x-face-function
617            (function
618             (lambda (beg end)
619               (x-face-mule-x-face-decode-message-header beg end))))))
620
621
622;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
623;; irchat-pj-2.4.24.07
624;;   IRC (チャット) クライアントの設定
625;;   M-x irchat で起動します
626;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
627
628(autoload 'irchat "irchat" nil t)
629
630;;; IRC server の指定
631;;; (いずれか一つをコメントアウトします)
632;;(setq irchat-server "irc.tohoku.ac.jp")
633;;(setq irchat-server "irc.kyutech.ac.jp")
634;;(setq irchat-server "irc.tokyo.wide.ad.jp")
635;;(setq irchat-server "irc.kyoto.wide.ad.jp")
636;;(setq irchat-server "irc.huie.hokudai.ac.jp")
637;;(setq irchat-server "irc.cc.yamaguchi-u.ac.jp")
638;;(setq irchat-server "irc.karrn.ad.jp")
639;;(setq irchat-server "irc.kyoto.wide.ad.jp")
640
641;;; ユーザー名とニックネーム
642;;; (nick は半角英数および []{}_\^ からなる最大 9 文字の文字列です)
643(setq irchat-name "IRC sample user")
644(setq irchat-nickname "VineUser")
645
646;;; デフォルトで参加するチャンネルのリスト
647;;;  (ここに書いたチャンネルには irchat の起動と同時に参加できます)
648;;(setq irchat-startup-channel-list '("#linuxjp,#vinetest"))
649(setq irchat-startup-channel-list '("#vinetest"))
650
651;;; オプション
652;;;   詳細は /usr/doc/irchat-pj-2.4.24.07/doc 以下のファイルを参照
653(setq irchat-reconnect-automagic t)      ; 切れた場合に再接続を試みる
654;;(setq irchat-channel-buffer-mode t)    ; チャネル分割表示モード
655;;(setq irchat-display-channel-always t)
656;;(setq irchat-default-freeze-local nil)
657
658
659;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
660;; YaTeX 1.72
661;;   [La]TeX 入力モード
662;;   M-x yatex とするか、.tex で終わるファイルを読み込むと起動します
663;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
664
665(autoload 'yatex-mode "yatex" "Yet Another LaTeX mode" t)
666
667;; YaTeX-mode
668(setq auto-mode-alist
669      (cons (cons "\\.tex$" 'yatex-mode) auto-mode-alist))
670(setq dvi2-command "xdvi"
671      tex-command "platex -src-specials"
672      dviprint-command-format "dvips %s | lpr"
673      YaTeX-kanji-code 3)
674
675;; YaHtml-mode
676(setq auto-mode-alist
677      (cons (cons "\\.html$" 'yahtml-mode) auto-mode-alist))
678(autoload 'yahtml-mode "yahtml" "Yet Another HTML mode" t)
679(setq yahtml-www-browser "firefox")
680
681
682;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
683;; dic (eldic.el)
684;;   Mule 上で dic を利用するための設定です
685;;   ~/lib/emacs に /usr/doc/dic/eldic.el をコピーして
686;;   dic-shell-file-name の辺りを適切に設定してください。
687;;   C-c C-c C-e で英和、C-c C-c C-j で和英が引けます。
688;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
689
690;;(global-set-key "\C-c\C-c\C-e" 'lookup-edic)
691;;(global-set-key "\C-c\C-c\C-j" 'lookup-jdic)
692;;(autoload 'lookup-edic "eldic" nil t)
693;;(autoload 'lookup-jdic "eldic" nil t)
694
695
696;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
697;; ホイールマウス対応
698;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
699(defun up-slightly () (interactive) (scroll-up 5))
700(defun down-slightly () (interactive) (scroll-down 5))
701(global-set-key [mouse-4] 'down-slightly)
702(global-set-key [mouse-5] 'up-slightly)
703                     
704(defun up-one () (interactive) (scroll-up 1))
705(defun down-one () (interactive) (scroll-down 1))
706(global-set-key [S-mouse-4] 'down-one)
707(global-set-key [S-mouse-5] 'up-one)
708
709(defun up-a-lot () (interactive) (scroll-up))
710(defun down-a-lot () (interactive) (scroll-down))
711(global-set-key [C-mouse-4] 'down-a-lot)
712(global-set-key [C-mouse-5] 'up-a-lot)
713
714;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
715;; Liece
716;;  IRC クライアントです。
717;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
718
719(autoload 'liece "liece" nil t)
720
721
722;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
723;; rpm-mode
724;;  RPM の spec ファイル作成用モード
725;;  ~/lib/emacs に /usr/doc/rpm/rpm-mode.el をコピーして以下の設定を
726;;  行ってください
727;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
728
729;(setq auto-mode-alist (nconc '(("\\.spec" . rpm-mode)) auto-mode-alist))
730;(autoload 'rpm-mode "rpm-mode" "Major mode for editing SPEC file of RPM." t)
731;(setq packager "Vine User <vine@hoge.fuga>");自分の名前
732;      (setq buildrootroot "/var/tmp");BuildRootの場所
733;      (setq projectoname "Project Vine");プロジェクト名
734
735
736;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
737;; その他の設定
738;;
739;; これらの設定を変更する場合は、~/.emacs.my.el に書くこと
740;; をお薦めします。etcskel パッケージのアップデート時に
741;; /etc/skel/.emacs.el をそのまま上書きできます。
742;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
743
744;;; Dired の設定
745;; Dired のリストフォーマット設定 (ls へのオプション)
746;; (setq dired-listing-switches "-aoFLt")
747;; ls の出力を英語にする(ls を LANG=C で実行)
748(add-hook 'dired-mode-hook  '(lambda ()(setenv "LANG" "C")))
749
750
751;;; C-h と Del の入れ替え
752;;; Help が Shift + Ctrl + h および Del に割当てられ、
753;;; 前一文字削除が Ctrl + h に割当てられます
754;(load-library "term/keyswap")
755;(if (eq window-system 'x)
756;    (progn
757;      (define-key function-key-map [delete] [8])
758;      (put 'delete 'ascii-character 8)))
759
760;;; Ctrl-H を前1文字削除に変更
761(define-key global-map "" 'backward-delete-char)
762
763;;; スクロールバーを右側に表示する
764(set-scroll-bar-mode 'right)
765
766;;; gzファイルも編集できるように
767(auto-compression-mode t)
768
769;;; 一行が 80 字以上になった時には自動改行する
770(setq fill-column 80)
771(setq text-mode-hook 'turn-on-auto-fill)
772(setq default-major-mode 'text-mode)
773
774;;; ステータスラインに時間を表示する
775(if (or (and (>= emacs-major-version 20)
776             (not (equal (getenv "LANG") "ja_JP.UTF-8")))
777        (>= emacs-major-version 22))
778    (progn
779      (setq dayname-j-alist
780           '(("Sun" . "日") ("Mon" . "月") ("Tue" . "火") ("Wed" . "水")
781             ("Thu" . "木") ("Fri" . "金") ("Sat" . "土")))
782      (setq display-time-string-forms
783           '((format "%s年%s月%s日(%s) %s:%s %s"
784                     year month day
785                     (cdr (assoc dayname dayname-j-alist))
786                     24-hours minutes
787                     load)))
788      ))
789(display-time)
790
791;;; visible-bell
792(setq visible-bell t)
793
794;;; 行番号を表示する
795(line-number-mode t)
796
797;;; mule/emacs -nw で起動した時にメニューバーを消す
798;(if window-system (menu-bar-mode 1) (menu-bar-mode -1))
799
800;;; 印刷設定
801;(setq-default lpr-switches '("-Pepson"))
802(setq-default lpr-switches '("-2P"))
803(setq-default lpr-command "mpage")
804
805;;; ps-print
806(setq ps-multibyte-buffer 'non-latin-printer)
807(if (>= emacs-major-version 21)
808    (progn
809      (require 'ps-mule)
810      (defalias 'ps-mule-header-string-charsets 'ignore)))
811
812;;; バッファの最後でnewlineで新規行を追加するのを禁止する
813(setq next-line-add-newlines nil)
814
815;;; 画面最下行で[↓]を押したときのスクロール数
816;(setq scroll-step 1)
817 
818;;; mark 領域に色付け
819;(setq transient-mark-mode t)
820
821;;; 最終更新日の自動挿入
822;;;   ファイルの先頭から 8 行以内に Time-stamp: <> または
823;;;   Time-stamp: " " と書いてあれば、セーブ時に自動的に日付が挿入されます
824(if (not (memq 'time-stamp write-file-hooks))
825    (setq write-file-hooks
826          (cons 'time-stamp write-file-hooks)))
827
828;;; shell-mode
829;; shell の出力するエスケープシーケンスによる色付き文字を
830;; 正しく表示する
831(autoload 'ansi-color-for-comint-mode-on "ansi-color" nil t)
832(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
833
834;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
835;; ユーザ用初期化ファイル
836;; ~/.emacs.my.el に個人用設定を書けます。
837;; このファイルを直接いじりたくない場合は、個人設定を分離してください
838
839(if (file-exists-p (expand-file-name "~/.emacs.my.el"))
840    (load (expand-file-name "~/.emacs.my.el") nil t nil))
841
842;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
843;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
844;; このファイルに間違いがあった場合に全てを無効にします
845(put 'eval-expression 'disabled nil)
846
847;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
848;; Local Variables:
849;; mode: emacs-lisp
850;; End:
Note: See TracBrowser for help on using the repository browser.