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

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

import vskel-4.1.0 from internal cvs repository

Line 
1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2;;  XEmacs 用 ユーザ設定ファイルのサンプル
3;;            MATSUBAYASHI 'Shaolin' Kohji (shaolin@vinelinux.org)
4;;                modified by Jun Nishii (jun@vinelinux.org)
5;;                modified by Hiroaki Irokawa (irorin@terra.dti.ne.jp)
6;;  $Id: init.el,v 1.8 2009/04/21 18:04:54 daisuke Exp $
7
8
9;;; 初期設定ファイルの指定
10;;; ここで指定したファイルにオプション設定等が書き込まれます
11
12(setq user-init-file "~/.xemacs/init.el")
13(setq custom-file "~/.xemacs/custom.el")
14
15
16;;; 漢字コードの指定
17
18(set-default-coding-systems 'euc-jp)
19(set-buffer-file-coding-system 'euc-jp-unix)
20
21(if (eq (console-type) 'tty)
22      (set-terminal-coding-system 'euc-jp))
23
24;;;画面の色(カーソル:暗い赤色)、サイズ(横:80桁、縦:40行)
25
26(setq default-frame-alist (append (list '(cursor-color . "purple")
27                                        '(width .  80)
28                                        '(height . 40))
29                                  default-frame-alist))
30
31;;; 一行が 80 字以上になった時には自動改行する
32(setq fill-column 80)
33(setq text-mode-hook 'turn-on-auto-fill)
34(setq default-major-mode 'text-mode)
35
36;;; 行数表示
37
38(custom-set-variables '(line-number-mode t))
39
40;;; gnuclient サーバを起動
41(load "gnuserv")
42(gnuserv-start)
43
44;;; gzファイルも編集できるように
45(auto-compression-mode t)
46
47;; 環境変数 EMACS_IME を調べる。
48;; Emacs_IME が空なら uimm を使用する
49
50(setq emacs-ime (getenv "EMACS_IME"))
51(if (null emacs-ime)
52    (setq emacs-ime "uim"))
53
54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
55;; Egg (Wnn フロントエンド) の設定
56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
57
58;; Wnn6/FreeWnn
59(if (or (equal emacs-ime "wnn")
60        (equal emacs-ime "Wnn")
61        (equal emacs-ime "wnn6")
62        (equal emacs-ime "Wnn6")
63        (equal emacs-ime "wnn8")
64        (equal emacs-ime "Wnn8"))
65  (progn
66    (load "egg")
67    (global-set-key "\C-\\" 'toggle-input-method)
68
69    (set-input-method "japanese-egg-wnn")
70    (set-language-info "Japanese" 'input-method "japanese-egg-wnn")
71
72    (setq egg-default-startup-file "eggrc-wnn") ; 95.6.1 by S.Tomura
73    (garbage-collect)
74
75    ;; jserver のリストを次の様にして指定できます
76    ;;(setq jserver-list '("vanilla" "espresso"))
77    (setq jserver-list (list (getenv "JSERVER") "localhost"))
78
79    ;; "nn" で「ん」を入力
80    (setq enable-double-n-syntax t)
81
82    ;; "." で「.」、"," で「,」を入力。
83    (setq use-kuten-for-period nil)
84    (setq use-touten-for-comma nil)
85
86    ;; 1234567890%#%"' を「半角」で入力"
87    (let ((its:*defrule-verbose* nil))
88    (its-define-mode "roma-kana")
89    (dolist (symbol '("1" "2" "3" "4" "5"
90                      "6" "7" "8" "9" "0"
91                      "#" "%" "\"" "'" ))
92      (its-defrule symbol symbol)))
93
94    ;; おまけ :-)
95    ;;(set-egg-fence-mode-format "♪" "♪" 'highlight)
96    )
97)
98
99
100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
101;; Wnn7Egg (Wnn7 フロントエンド) の設定
102;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
103
104(if (or (equal emacs-ime "wnn7")
105        (equal emacs-ime "Wnn7"))
106    (progn
107      (setq load-path (append '("/usr/share/wnn7/elisp/xemacs21") load-path))
108      (global-set-key "\C-\\" 'toggle-input-method)
109      ;; (global-set-key "\C-o" 'toggle-input-method)
110      (load "wnn7egg-leim")
111      (set-input-method "japanese-egg-wnn7")
112      (set-language-info "Japanese" 'input-method "japanese-egg-wnn7")
113
114      ;; "nn" で「ん」を入力
115      (setq enable-double-n-syntax t)
116      ;; 候補選択モード
117      (egg-use-input-predict)
118      (setq egg-predict-realtime nil)
119      ;; インライン候補選択モード
120      (setq egg-predict-mode "inline")
121      ;; ウインドウ候補選択モード
122      ;(setq egg-predict-mode "window")
123
124      ;; 候補リスト表示
125      (define-key wnn7-henkan-mode-map " " 'wnn7-henkan-select-kouho-dai)
126
127      ;; 1234567890%#%"'/\| を「半角」で入力
128      (let ((its:*defrule-verbose* nil))
129        (its-define-mode "roma-kana")
130        (dolist (symbol '("1" "2" "3" "4" "5"
131                          "6" "7" "8" "9" "0"
132                          "#" "%" "\"" "'" "/" "\\" "|"))
133          (its-defrule symbol symbol)))
134      )
135  )
136
137;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
138;; かんなの設定
139;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
140
141(if (or (equal emacs-ime "canna")
142        (equal emacs-ime "Canna")
143        )
144   (progn
145      (load-library "canna")
146
147      ;; color-mate を使わないで、漢字変換に色を付けたい時に
148      (setq canna-use-color t)
149
150      ;; フェンスモードでなくアンダーラインを使う
151      ;;(setq canna-with-fences nil)
152      ;;(setq canna-underline t)
153
154      ;; Canna サーバの指定
155      (if (null (getenv "CANNA_SERVER"))
156          (setq canna-server "unix")
157        (setq canna-server (getenv "CANNA_SERVER")))
158      (canna)
159
160      (global-set-key "\C-_" 'canna-undo)  ;アンドゥの設定。
161      (setq canna-save-undo-text-predicate ;アンドゥバッファへ入れる条件
162            '(lambda (s) (> (length (car s)) 2)) )
163      (setq canna-undo-hook ;アンドゥ+α。
164            '(lambda () (message "再変換します....")
165               (canna-do-function canna-func-henkan)) )
166
167      ;;かんなの変換中に BS & DEL を使う
168      ;;(define-key canna-mode-map [backspace] [?\C-h])
169      ;;(define-key canna-mode-map [delete] [?\C-h])
170
171      ;;かんなの変換中に C-h を使う (with term/keyswap)
172      (define-key canna-mode-map [?\177] [?\C-h])
173
174      (set-input-method 'japanese-canna)
175   )
176)
177
178;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
179;; Anthy の設定
180;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
181
182(if (or (equal emacs-ime "anthy-el")
183        (equal emacs-ime "Anthy-el"))
184    (progn
185      (require 'anthy)
186      ;; 変換開始キー
187      (define-key global-map "\C-\\" 'anthy-mode)
188      (define-key global-map [kanji] 'anthy-mode)
189
190      ;;; スペースは半角で入力する
191      (setq anthy-wide-space " ")
192    )
193)
194
195;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
196;; uim.el の設定
197;; (詳しくは /usr/share/doc/uim-el-*/README.ja を参照してください)
198;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
199
200(if (or (equal emacs-ime "uim")
201        (equal emacs-ime "UIM")
202        (equal emacs-ime "scim")
203        (equal emacs-ime "SCIM"))
204    (progn
205      (require 'uim)
206      ;; 変換開始キー
207      (global-set-key "\C-\\" 'uim-mode)
208      (global-set-key "\C-o" 'uim-mode)
209      (global-set-key [kanji] 'uim-mode)
210      ;(global-set-key [M-kanji] 'uim-mode)
211      ;(global-set-key [?\S-\ ] 'uim-mode)
212      (global-set-key [zenkaku-hankaku] 'uim-mode)
213
214      ;; Anthy の時はデフォルトでひらがな入力に
215      (setq uim-default-im-prop '("action_anthy_hiragana"
216                                  "action_canna_hiragana"
217                                  "action_skk_hiragana"))
218
219      ;; 変換候補をデフォルトでインライン表示にする
220      (setq uim-candidate-display-inline t)
221    )
222)
223
224;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
225;; XEmacs のフォント/カラー設定
226;; (color-mate を使わない時に色をつける設定.)
227;; XEmacs には hilit19 がないので,色はつきませんが,
228;; 代りに font-lock を使って簡易ですが色をつけられます.
229;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
230
231(set-face-foreground 'default "black" nil '(x color))
232(set-face-background 'default "#eeeeff" nil '(x color))
233
234(require 'font-lock)
235(setq font-lock-verbose nil)
236(put 'yatex-mode 'font-lock-defaults 'tex-mode)
237(put 'yahtml-mode 'font-lock-defaults 'html-mode)
238
239;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
240;; XEmacs で色を付ける (color-mate の設定読み込み)
241;; Vine Linux 2.1 までの旧式の設定
242;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
243;;
244;;(load "~/.emacs-color.el")
245
246
247;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
248;;; Mule-UCS の設定
249;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
250
251;(require 'un-define)
252;(set-coding-priority-list '(utf-8))
253;(set-coding-category-system 'utf-8 'utf-8)
254
255
256;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
257;; SEMI
258;;   Vine 1.9 からは tm (Tiny Mime) の代わりに semi を使います
259;;   (Mew は tm や semi なしでも MIME に対応しています)
260;;
261;; /etc/xemacs-??.?.??/site-start.d/51semi-init.el
262;; を読み込みますので設定不要です。
263;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
264
265;(require 'mime-setup)
266;(load "path-util")
267;(setq rmail-enable-mime t)
268
269;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
270;; rail
271;; rail-1.0.2 を使って User-Agent: フィールドのコードネームを日本語化する
272;; /etc/xemacs-??.?.??/site-start.d/60rail-init.el
273;; を読み込みますので設定不要です。
274;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
275;(setq rail-emulate-genjis t)
276;(if (module-installed-p 'rail) (load "rail"))
277
278
279;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
280;; T-Gnus 6.13.3 (参考)
281;;   NetNews リーダー GNUS (SEMI 対応版)
282;;   M-x gnus で起動します
283;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
284
285;; News Server 名やドメイン名を適切に指定してください
286;(setq gnus-nntp-server "news.hoge.hoge.or.jp")
287;(setq gnus-local-domain "hoge.hoge.or.jp")
288;(setq gnus-local-organization "HogeHoGe Org.")
289;(setq gnus-use-generic-from t)
290
291
292;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
293;; w3
294;;   XEmacs 上で動くブラウザです
295;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
296
297;; w3 でプロキシの設定が必要な場合、
298;; ~/.w3/profile 内の設定を編集して下さい.
299;; 書式は以下の通りです.
300;(setq url-proxy-services '(
301;      ("http" . "http://proxy.nowhere.ne.jp:8080/")
302;      ("ftp" . "http://proxy.nowhere.ne.jp:8080/")
303;      ("gopher" . "http://proxy.nowhere.ne.jp:8080/")
304;      ("no_proxy" . "://[^/]*nowhere.ne.jp/\\|://192.168"))
305;    url-using-proxy t)
306
307
308;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
309;; Mew -  Messaging in the Emacs World
310;;   メールリーダー Mew
311;;   M-x mew で起動します
312;;   これ以外の設定は ~/.mew.el で行います
313;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
314
315(autoload 'mew "mew" nil t)
316(autoload 'mew-send "mew" nil t)
317
318;; Toolbarに追加
319;(setq toolbar-mail-commands-alist (quote ((mew . mew) )))
320;(setq toolbar-mail-reader (quote mew))
321
322;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
323;; Wanderlust
324;;   IMAP にも対応したメール/ニュースリーダ
325;;   これ以外の設定は ~/.wl で行います
326;;   ~/.wl のサンプルは /usr/share/doc/Wanderlust-?.??.? 以下にあります
327;;
328;; /etc/xemacs-??.?.??/site-start.d/55wl-init.el
329;; を読み込みます
330;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
331
332;(autoload 'wl "wl" "Wanderlust" t)
333;(autoload 'wl-draft "wl" "Write draft with Wanderlust." t)
334
335;; Toolbarに追加
336;(setq toolbar-mail-commands-alist (quote ((wl . wl) )))
337;(setq toolbar-mail-reader (quote wl))
338
339;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
340;; X-Face
341;;   Mew や Wanderlust などで、X-Face 画像つきのメッセージを表示します
342;;;  /usr/share/doc/x-face-xemacs-1.3.6.23/README.ja
343;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
344
345(when (and window-system (module-installed-p 'x-face))
346   (autoload 'x-face-xmas-mew-display-x-face "x-face" nil t)
347   (setq wl-highlight-x-face-function
348      'x-face-xmas-mew-display-x-face)
349   (setq x-face-add-x-face-version-header t))
350
351;; 起動画面を表示しない
352;(setq x-face-inhibit-loadup-splash t)
353
354;;; 多階調 X-Face 作成
355;;; M-x convert-image-to-gray-x-face で起動します
356;(autoload 'convert-image-to-gray-x-face "make-gray-x-face" nil t)
357
358
359;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
360;; irchat-pj-2.4.24.07
361;;   IRC (チャット) クライアントの設定
362;;   M-x irchat で起動します
363;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
364
365(autoload 'irchat "irchat" nil t)
366
367;;; IRC server の指定
368;;; (いずれか一つをコメントアウトします)
369;;(setq irchat-server "irc.tohoku.ac.jp")
370;;(setq irchat-server "irc.kyutech.ac.jp")
371;;(setq irchat-server "irc.tokyo.wide.ad.jp")
372;;(setq irchat-server "irc.kyoto.wide.ad.jp")
373;;(setq irchat-server "irc.huie.hokudai.ac.jp")
374;;(setq irchat-server "irc.cc.yamaguchi-u.ac.jp")
375;;(setq irchat-server "irc.karrn.ad.jp")
376;;(setq irchat-server "irc.kyoto.wide.ad.jp")
377
378;;; ユーザー名とニックネーム
379;;; (nick は半角英数および []{}_\^ からなる最大 9 文字の文字列です)
380(setq irchat-name "IRC sample user")
381(setq irchat-nickname "PJEtest")
382
383;;; デフォルトで参加するチャンネルのリスト
384;;;  (ここに書いたチャンネルには irchat の起動と同時に参加できます)
385;;(setq irchat-startup-channel-list '("#linuxjp,#pjetest"))
386(setq irchat-startup-channel-list '("#VineUsers"))
387
388;;; オプション
389;;;   詳細は /usr/doc/irchat-pj-xemacs-2.4.24.07/doc 以下のファイルを参照
390(setq irchat-reconnect-automagic t)      ; 切れた場合に再接続を試みる
391;;(setq irchat-channel-buffer-mode t)    ; チャネル分割表示モード
392;;(setq irchat-display-channel-always t)
393;;(setq irchat-default-freeze-local nil)
394
395
396;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
397;; YaTeX 1.67
398;;   [La]TeX 入力モード
399;;   M-x yatex とするか、.tex で終わるファイルを読み込むと起動します
400;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
401
402(autoload 'yatex-mode "yatex" "Yet Another LaTeX mode" t)
403
404;; YaTeX-mode
405(setq auto-mode-alist
406      (cons (cons "\\.tex$" 'yatex-mode) auto-mode-alist))
407(setq dvi2-command "xdvi"
408      tex-command "platex"
409      dviprint-command-format "dvips %s | lpr"
410      YaTeX-kanji-code 3)
411
412;; YaHtml-mode
413(setq auto-mode-alist
414      (cons (cons "\\.html$" 'yahtml-mode) auto-mode-alist))
415(autoload 'yahtml-mode "yahtml" "Yet Another HTML mode" t)
416;(setq yahtml-www-browser "mozilla")
417;(setq yahtml-www-browser "konqueror")
418(setq yahtml-www-browser "firefox")
419(setq yahtml-kanji-code 3) ; 1=sjis, 2=jis, 3=euc (2)
420
421
422;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
423;; ホイールマウス対応
424;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
425
426(define-key global-map 'button4
427  '(lambda (&rest args)
428    (interactive)
429    (let ((curwin (selected-window)))
430      (select-window (car (mouse-pixel-position)))
431      (scroll-down 5)
432      (select-window curwin)
433)))
434(define-key global-map [(shift button4)]
435  '(lambda (&rest args)
436    (interactive)
437    (let ((curwin (selected-window)))
438      (select-window (car (mouse-pixel-position)))
439      (scroll-down 1)
440      (select-window curwin)
441)))
442(define-key global-map [(control button4)]
443  '(lambda (&rest args)
444    (interactive)
445    (let ((curwin (selected-window)))
446      (select-window (car (mouse-pixel-position)))
447      (scroll-down)
448      (select-window curwin)
449)))
450(define-key global-map 'button5
451  '(lambda (&rest args)
452    (interactive)
453    (let ((curwin (selected-window)))
454      (select-window (car (mouse-pixel-position)))
455      (scroll-up 5)
456      (select-window curwin)
457)))
458(define-key global-map [(shift button5)]
459  '(lambda (&rest args)
460    (interactive)
461    (let ((curwin (selected-window)))
462      (select-window (car (mouse-pixel-position)))
463      (scroll-up 1)
464      (select-window curwin)
465)))
466(define-key global-map [(control button5)]
467  '(lambda (&rest args)
468    (interactive)
469    (let ((curwin (selected-window)))
470      (select-window (car (mouse-pixel-position)))
471      (scroll-up)
472      (select-window curwin)
473)))
474
475
476;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
477;; その他の設定
478;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
479
480;;; マクロサーチパスの追加
481;;; ~/lib/emacs 以下にユーザ用の *.el, *.elc を置くことができます
482;;(setq load-path (append '("~/lib/emacs") load-path))
483
484
485;;; ステータスラインに時間を表示する
486(display-time)
487
488
489;;; rpm-mode の読み込み
490;;; rpm-mode.el は spec ファイルの作成に便利です。
491;;;   ~/lib/emacs に /usr/doc/rpm/rpm-mode.el をコピーして以下の設定を
492;;; 行ってください。
493
494;(setq auto-mode-alist (nconc '(("\\.spec" . rpm-mode)) auto-mode-alist))
495;(autoload 'rpm-mode "rpm-mode" "Major mode for editing SPEC file of RPM." t)
496;(setq packager "Vine User <vine@hoge.fuga>");自分の名前
497;      (setq buildrootroot "/tmp");BuildRootの場所
498;      (setq projectoname "Project Vine");プロジェクト名
499
500
501;;; 最終更新日の自動挿入
502;;;   ファイルの先頭から 8 行以内に Time-stamp: <> または
503;;;   Time-stamp: " " と書いてあれば、セーブ時に自動的に日付が挿入されます
504(if (not (memq 'time-stamp write-file-hooks))
505    (setq write-file-hooks
506          (cons 'time-stamp write-file-hooks)))
507
508
509;;;バッファの最後でnewlineで新規行を追加するのを禁止する
510(setq next-line-add-newlines nil)
511
512;;;印刷設定
513(setq-default lpr-switches '("-2P"))
514(setq-default lpr-command "mpage")
515
516;;; キーバインド定義
517(global-set-key [backspace] 'delete-backward-char) ; BS
518(global-set-key [delete] 'delete-char)             ; DEL
519(global-set-key "\C-h" 'delete-backward-char)      ; C-h(=DEL)
520(global-set-key "\M-?" 'help-for-help)             ; M-?(=help)
521(global-set-key [home] 'beginning-of-buffer)       ; HOME(バッファの先頭に飛ぶ)
522(global-set-key [end] 'end-of-buffer)              ; END(バッファの最後に飛ぶ)
523
524;(global-set-key [f1] 'find-file)                ; C-x C-f
525;(global-set-key [f2] 'save-buffer)              ; C-x C-s
526;(global-set-key [f6] 'set-mark-command)         ; C-SPC
527;(global-set-key [f7] 'kill-primary-selection)   ; Cut
528;(global-set-key [f8] 'copy-primary-selection)   ; Copy
529;(global-set-key [f9] 'yank-clipboard-selection) ; Paste
530
531
532;;; アプリメニューにいろいろ追加する設定
533;;; http://www.jmos.net/xemacs/#menu
534;(add-menu-button '("Apps")          ["navi2ch"  navi2ch  t])
535;(add-menu-button '("Apps")          ["Liece" liece t])
536;(add-menu-button '("Apps")          ["w3m" w3m t])
537;(add-menu-button '("Apps")          ["speedbar" speedbar t])
538;(add-menu-button '("Apps")          ["TiMidity++" timidity t])
539
540
541;;; スクロールを1行単位にする
542(setq scroll-step 1)
543
544;;; *.~ とかのバックアップファイルを作らない
545;(setq make-backup-files nil)
546
547;;; .#* とかのバックアップファイルを作らない
548;(setq auto-save-default nil)
549
550;;; 以前編集したファイルのカーソル位置を覚える設定
551(require 'saveplace)
552(setq-default save-place t)
553
554;; scratch モードの最初のメッセージは消す
555(setq initial-scratch-message nil)
556
557;;; C-t、M-C-tでバッファの高速切り替え
558(defun previous-buffer ()
559  "Select previous window."
560  (interactive)
561  (bury-buffer))
562(defun backward-buffer ()
563  "Select backward window."
564  (interactive)
565  (switch-to-buffer
566   (car (reverse (buffer-list)))))
567(global-set-key "\C-t"    'previous-buffer)
568(global-set-key "\M-\C-t" 'backward-buffer)
569
570
571;; Info では frame-title に詳しい情報を
572(add-hook 'Info-startup-hook
573          #'(lambda ()
574              (make-local-variable 'frame-title-format)
575              (setq frame-title-format
576                    (concat "*info*  ("
577                            (file-name-nondirectory
578                             (if (stringp Info-current-file)
579                                 Info-current-file
580                               (or buffer-file-name "")))
581                            ")  "
582                            Info-current-node))))
583(add-hook 'Info-select-hook
584          #'(lambda ()
585              (setq frame-title-format
586                    (concat "*info*  ("
587                            (file-name-nondirectory
588                             (if (stringp Info-current-file)
589                                 Info-current-file
590                               (or buffer-file-name "")))
591                            ")  "
592                            Info-current-node))))
593
594;;; gutter を表示しない
595;(setq gutter-buffers-tab-enabled nil)
596
597;;; shell-mode
598;; shell の出力するエスケープシーケンスによる色付き文字を
599;; 正しく表示する
600(autoload 'ansi-color-for-comint-mode-on "ansi-color" nil t)
601(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
602
603;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
604;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
605;; このファイルに間違いがあった場合に全てを無効にします
606(put 'eval-expression 'disabled nil)
Note: See TracBrowser for help on using the repository browser.