~/lib/conf/emacs/hook.el
;;;;;;;;;;;;;;;;;;;;
;; verilog-mode
;;;;;;;;;;;;;;;;;;;;
(add-hook 'verilog-mode-hook
'(lambda ()
(font-lock-mode 1)))
;;;;;;;;;;;;;;;;;;;;
;; Dired
;;;;;;;;;;;;;;;;;;;;
;; Dired のリストフォーマット設定 (ls へのオプション)
;; (setq dired-listing-switches "-aoFLt")
;; ls の出力を英語にする(ls を LANG=C で実行)
(add-hook 'dired-mode-hook
'(lambda ()
(setenv "LANG" "C")))
;;;;;;;;;;;;;;;;;;;;
;; c-mode
;;;;;;;;;;;;;;;;;;;;
(add-hook 'c-mode-common-hook
'(lambda ()
(setq indent-tabs-mode nil) ; use 'spaces' instead of 'tab'
(c-set-style "k&r")
;; c-mode, two space 'tab', replace tab with spaces
;;(setq-default tab-width 5)
(setq c-basic-offset 4)))
;(put 'set-goal-column 'disabled nil)
;;;;;;;;;;;;;;;;;;;;
;; wanderlust
;;;;;;;;;;;;;;;;;;;;
(add-hook 'wl-summary-mode-hook
'(lambda ()
(defun wl-summary-redisplay-force ()
(interactive)
(wl-summary-redisplay 't))
))
;;;;;;;;;;;;;;;;;;;;
;; yatex
;;;;;;;;;;;;;;;;;;;;
(add-hook 'yatex-mode-hook
'(lambda ()
(defvar open-figure-by-tgif-program-name)
(setq open-figure-by-tgif-program-name
(if (eq system-type 'windows-nt)
"c:/cygwin/usr/X11R6/bin/tgif.exe"
"tgif"))
(defun open-figure-by-tgif (beg end)
(interactive "r")
(progn
(copy-region-as-kill beg end)
(start-process
; "tgif" "*tgif*" open-figure-by-tgif-program-name "-display" ":1.0"
"tgif" "*tgif*" open-figure-by-tgif-program-name
(expand-file-name
(concat default-directory
(concat
((lambda (a)
(substring a 0 (string-match "\\.eps$" a)))
(car kill-ring-yank-pointer))))))))
(global-set-key "\C-c\C-o" 'open-figure-by-tgif)
))
>> emacsの設定