私の.emacs(抜粋)

Emacs20用です。ぱくってもいいですが、できたらしらせてください。こうするといいよ〜なども歓迎。
;;;; -*- coding: euc-japan -*-
;;;; .emacs Emacs customize file by Hiroshi Takekawa
;;;; Last Modified: Thu Feb 26 23:03:06 2004.

;;;;          *** ATTENTION!! ***
;;;; If you wanna copy a part or whole of this file,
;;;; you MUST use it at your own risk.
;;;; But please send me your opinion to sian@big.or.jp.


;; Mule-UCS
(when (locate-library "un-define")
  ;; Mule-UCS
  (require 'un-define)
  ;; JIS X 0213 Emacs kit
  (require 'jisx0213)
  (setq mule-version (concat mule-version " / Mule-UCS " mucs-version))
  (when window-system
    (set-fontset-font "fontset-14" 'japanese-jisx0213-1 "-misc-fixed-medium-r-normal--14-130-75-75-c-140-jisx0213.2000-1")
    (set-fontset-font "fontset-14" 'japanese-jisx0213-2 "-misc-fixed-medium-r-normal--14-130-75-75-c-140-jisx0213.2000-2"))
  )

(set-language-environment "Japanese")
(set-default-coding-systems 'euc-japan-unix)
(set-terminal-coding-system 'euc-japan-unix)
(set-keyboard-coding-system 'euc-japan-unix)
(set-buffer-file-coding-system 'euc-japan-unix)
;(set-default-font "-*-fixed-medium-r-normal-*-14-*-*-*-*-*-fontset-small")
(custom-set-variables
 '(mouse-yank-at-point t)
 '(diff-switches "-u")
 '(visible-bell t))
(custom-set-faces)

;; X上でなければメニューバーを消す。X上ならばツールバーを消してfont等の設定
(if window-system
    (progn
      (and (fboundp 'tool-bar-mode) (tool-bar-mode 0))
      (setq default-frame-alist
	    (append
	     '((line-space . "0") (width . 86) (height . 49) (font . "fontset-14"))
	     default-frame-alist)))
  (menu-bar-mode 0))

; 起動直後の*scratch* buffer に入る文字列をなくす
(setq initial-scratch-message nil)

; ファイルの末尾にあるlocal変数を読んだ時には確認する
(setq enable-local-variables 'query)

;; カーソルが行頭にあるときに、C-k 1回だけで その行全体が削除されるようにする
(setq kill-whole-line t)

;; Do not show startup message
;(setq inhibit-startup-message t)

;; カーソルの位置が何行何桁目かを表示する
(line-number-mode 1)
(column-number-mode 1)

;; .save.. というファイルを作らない
(setq auto-save-list-file-name nil)
(setq auto-save-list-file-prefix nil)

;; 最下行で↓を押しても勝手に行を増やさない
(setq next-line-add-newlines nil)

;; Eval文を評価する
(put 'eval-expression 'disabled nil)

;; options-toggle
(and (locate-library "options-toggle") (load "options-toggle"))
;; filladapt
(and (locate-library "filladapt") (require 'filladapt))

;; ファイルを書きこむ時のフック
(add-hook 'write-file-hooks
	  (function
	   (lambda ()
	     (trim-eob)
	     (set-lastmodified-tag)
	     ;(trim-buffer)
	     )))

(defun trim-region (start end)
  "リージョン中の行末の無駄な空白を消去"
  (interactive "r")
  (save-excursion
    (save-restriction
      (narrow-to-region start end)
      (goto-char start)
      (replace-regexp "[ \t]+$" ""))))

(defun trim-eob ()
  "バッファの最後に溜った空行を消去"
  (interactive)
  (save-excursion
    (progn
      (goto-char (point-max))
      (delete-blank-lines)
      nil)))

(defun trim-buffer ()
  "バッファ中の行末の無駄な空白を消去"
  (interactive)
  (save-excursion
    (mark-whole-buffer)
    (trim-region (region-beginning) (region-end))))

;; I don't use timestamp.el... I don't know why:)
(defun set-lastmodified-tag ()
  "Last Modified: という文字列を見付けると新しい日付を挿入する"
  (interactive)
  (let ((tostr (concat "Last Modified: " (current-time-string) ".")))
    (save-excursion
      (goto-char (point-min))
      (while (re-search-forward
	      "\\Last Modified:\\([A-Za-z0-9: ]*\\)?\\." nil t)
	(replace-match tostr nil t)))))

;; bufferの先頭でカーソルを戻そうとしても音をならなくする
(defun previous-line (arg)
  (interactive "p")
  (condition-case nil
      (line-move (- arg))
    (beginning-of-buffer)))

;; bufferの最後でカーソルを動かそうとしても音をならなくする
(defun next-line (arg)
  (interactive "p")
  (condition-case nil
      (line-move arg)
    (end-of-buffer)))
;ただし新規の時をのぞく(^^;;

;; auto-mode
(setq auto-mode-alist
      (nconc '(("\\.\\([pP][Llm]\\|al\\)$" . cperl-mode)
	       ("\\.sh$" . sh-mode)
	       ("\\.[ps]?html?$" . html-helper-mode)
	       ("\\.ja$" . html-helper-mode)
	       ("\\.en$" . html-helper-mode)
	       ("\\.sgml$" . sgml-mode)
	       ("\\.xml$" . xml-mode)
	       ("\\.tex$" . yatex-mode)
	       ("\\.sty$" . yatex-mode)
	       ("\\.dtx$" . yatex-mode)
	       ("\\.java$" . java-mode)
	       ("\\.cc$" . c++-mode)
	       ("\\.[ch]$" . c-mode)
	       ("\\.potx?$\\|\\.po$" . po-mode)
	       )
	     auto-mode-alist))

; po-mode for Emacs20
(autoload 'po-find-file-coding-system "po-mode")
(modify-coding-system-alist 'file "\\.potx?\\'\\|\\.po\\." 'po-find-file-coding-system)

; hilit19による色つけをsgml-modeにだけ適用する
(if (and window-system (x-display-color-p))
    (progn
      (setq hilit-mode-enable-list '(sgml-mode)
	    hilit-background-mode   'light
	    hilit-inhibit-hooks     nil
	    hilit-inhibit-rebinding nil)
      (require 'hilit19)))

;; advices
(defadvice switch-to-buffer (before existing-buffer activate compile)
  "When interactive, switch to existing buffers only, unless given a prefix argument."
  (interactive
   (list (read-buffer "Switch to buffer: "
		      (other-buffer)
		      (null current-prefix-arg)))))


;; 日付/時刻表示
(setq display-time-24hr-format t)
(setq display-time-format "%m/%d(%a) %R")
(setq display-time-day-and-date t)
(display-time)


;; saveplace.el
(load "saveplace")
(setq-default save-place t)


;; dmacro.el - キー操作の繰返し検出 & 実行
(defconst *dmacro-key* "\C-z" "繰返し指定キー")
(global-set-key *dmacro-key* 'dmacro-exec)
(autoload 'dmacro-exec "dmacro" nil t)


;; lookup
(autoload 'lookup "lookup" nil t)
(autoload 'lookup-region "lookup" nil t)
(autoload 'lookup-pattern "lookup" nil t)

(define-key help-map "o" 'lookup-pattern)
(define-key help-map "l" 'lookup)


;; Add HTML-helper
(autoload 'html-helper-mode "html-helper-mode" "Yay HTML" t)
(add-hook 'html-helper-mode-hook
          (function (lambda () (set-buffer-file-coding-system 'euc-jp))))


;; font-lockの設定
(global-font-lock-mode t)
(setq font-lock-maximum-decoration
      '((c-mode . 3)
	(sgml-mode . 3)
	(perl-mode . 3)
	(cperl-mode . 3)
	(asm-mode . 2)
	(sh-mode . 3)
	(emacs-lisp-mode . 3)
	(t . t)))


;; pcl-cvs
(global-set-key "\C-cu" 'cvs-update)


;; calculator
(autoload 'calculator "calculator" "Run the pocket calculator." t)
(global-set-key "\C-c\C-m" 'calculator)


;; po-mode
(autoload 'po-mode "po-mode" nil t)
(setq po-auto-replace-revision-date t)
;(setq po-auto-edit-with-msgid t)
(setq po-default-file-header "# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001 Free Software Foundation, Inc.
# Hiroshi Takekawa , 2001.
#
#, fuzzy
msgid \"\"
msgstr \"\"
\"Project-Id-Version: PACKAGE VERSION\\n\"
\"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\\n\"
\"Last-Translator: Hiroshi Takekawa \\n\"
\"Language-Team: Japanese \\n\"
\"MIME-Version: 1.0\\n\"
\"Content-Type: text/plain; charset=EUC-JP\\n\"
\"Content-Transfer-Encoding: 8bit\\n\"
")


;; C-mode の設定
(setq c-indent-level 4
      c-continued-brace-offset -2
      c-continued-statement-offset 4
      c-argdecl-indent 0
      c-brace-offset -4
      c-label-offset -4)
; c-basic-offset 2


;; Add cc-mode
(autoload 'c++-mode  "cc-mode" "C++ Editing Mode" t)
(autoload 'c-mode    "cc-mode" "C Editing Mode" t)
(autoload 'objc-mode "cc-mode" "Objective-C Editing Mode" t)
(and (fboundp 'turn-on-filladapt-mode) (add-hook 'c-mode-hook 'turn-on-filladapt-mode))


;; Add sh-mode
(autoload 'sh-mode "sh-script" "sh mode" t)


;; Add sgml-mode
(autoload 'sgml-mode "psgml" "Major mode to edit SGML files." t)
(autoload 'xml-mode "psgml" "Major mode to edit XML files." t)
;(autoload 'sgml-mode "lnxsgml" "Major mode for editing files of SGML" t)
(setq sgml-catalog-files '("CATALOG" "/usr/local/share/sgml/catalog"))

(setq sgml-set-face t)
(setq sgml-auto-insert-required-elements nil)
(setq sgml-general-insert-case 'lower)
; psgml-xpointer
;(autoload 'sgml-xpointer "psgml-xpointer" nil t)
(setq sgml-markup-faces '((start-tag  . function-name-face)
                          (end-tag    . function-name-face)
                          (comment    . comment-face)
                          (ignored    . comment-face)
                          (pi         . keyword-face)
                          (sgml       . keyword-face)
                          (doctype    . type-face)
                          (entity     . string-face)
                          (shortref   . bold)))


;; For asm-mode
(setq font-lock-maximum-size
      '((asm-mode . 512000) (t . 256000)))


;; Add global gtags-mode
(autoload 'gtags-mode "gtags" "" t)


;; Add java-mode
(autoload 'java-mode "cc-mode" "Java Mode" t)


;; Add cperl-mode
(autoload 'cperl-mode "cperl-mode" "alternate mode for editing Perl programs" t)
(setq cperl-indent-level 4)
(setq cperl-hairy t)
(setq interpreter-mode-alist (append interpreter-mode-alist
				     '(("miniperl" . cperl-mode))))
(define-key global-map [S-down-mouse-2] 'imenu)

;; cperl-modeのファイルはセーブしたあと実行可能にする
(add-hook 'after-save-hook
          (function (lambda ()
             (and (memq major-mode '(cperl-mode))
                  (call-process "chmod" nil nil nil
                                "+x" (buffer-file-name))))))

;; perlの場合 (compile)はperl -wc
(add-hook 'cperl-mode-hook
	  (function (lambda ()
		      (require 'perlplus)
		      (define-key cperl-mode-map "\M-\t" 'perlplus-complete-symbol)
		      (perlplus-setup)
		      (abbrev-mode 0)
		      (make-local-variable 'compile-command)
		      (setq compile-command
			    (concat "perl -wc "
				    (buffer-file-name))))))


; yatex-modeを起動させる設定
(autoload 'yatex-mode "yatex" "Yet Another LaTeX mode" t)

; キーバインド変更
(add-hook 'yatex-mode-load-hook
	  (function
	   (lambda ()
	     (YaTeX-define-begend-key "be" "eqnarray")
	     (YaTeX-define-begend-key "ba" "array")
	     (YaTeX-define-begend-key "bA" "abstract"))))
				      
;; yatex-modeでだけ句読点を変える
(add-hook 'yatex-mode-hook
	  (function
	   (lambda ()
	     ;; 野鳥起動時にskkが起動されてなければ起動してしまう
	     (or (boundp 'skk-rom-kana-rule-list) (skk-mode))
	     ;; 一応確認
	     (if (and (boundp 'skk-rom-kana-rule-list)
		      (boundp 'skk-rule-tree)
		      (fboundp 'skk-compile-rule-list))
		 ;; 変換テーブル、木をbuffer localにして変更
		 (progn
		   (make-local-variable 'skk-rom-kana-rule-list)
		   (setq skk-rom-kana-rule-list
			 (append skk-rom-kana-rule-list
				 '(("z=" nil ("≠" . "≠"))
				   (","  nil (", " . ", "))  
				   ("."  nil (". " . ". "))
				   ("h," nil ("、" . "、"))  
				   ("h." nil ("。" . "。")))))
		   (make-local-variable 'skk-rule-tree)
		   (setq skk-rule-tree
			 (skk-compile-rule-list
			  skk-rom-kana-base-rule-list skk-rom-kana-rule-list)))
	       (message "Unsupported skk version")))))

; 関数補完
(setq YaTeX-math-funcs-list
      '(("s" "sin")
	("as" "arcsin")
	("c" "cos")
	("ac" "arccos")
	("t" "tan")
	("at" "arctan")
	("sh" "sinh")
	("ch" "cosh")
	("th" "tanh")
	("ln" "ln")
	("log" "log")))
(setq YaTeX-math-key-list-private
      '(("'" . YaTeX-math-funcs-list)))

; 漢字コードの設定
; 1 = Shift JIS, 2 = JIS, 3 = EUC
; defaultはそれぞれ2
(setq YaTeX-kanji-code 3)
;(setq yahtml-kanji-code 3)

;; printer の設定
;(setq dviprint-command-format "jdvi2kps %f %t %s | lpr -v -Plp -#1")
(setq dviprint-command-format "dvips %s")

(setq tex-command "platex")
;; プレビューワ、プリンタの設定
(setq dvi2-command "xdvi -geometry 900x1000+200+0 -s 6")


;; mgp-mode
(setq auto-mode-alist
      (cons '("\\.mgp?\\'" . mgp-mode) 
	    auto-mode-alist))
(autoload 'mgp-mode "mgp-mode")
(setq mgp-options "-g 800x600")
(setq mgp-window-height 6)
(cond 
 ((= emacs-major-version 19)     ;; Emacs 19, Mule 2.3
  (setq mgp-mode-hook
	(function (lambda () 
		    (set-file-coding-system '*iso-2022-jp*unix)))))
 ((= emacs-major-version 20)     ;; Emacs 20
  (setq mgp-mode-hook
	(function (lambda ()
		    (set-buffer-file-coding-system 'iso-2022-jp-unix))))))


;; dired 用設定
(setq insert-directory-program "ls-wrapper")
(setq dired-move-to-filename-regexp
  "\\(月\\|Jan\\|Feb\\|Mar\\|Apr\\|May\\|Jun\\|Jul\\|Aug\\|Sep\\|Oct\\|Nov\\|Dec\\)[ ]+[0-9]+[日]?[ ]? [ 0-9][0-9][:0-9][0-9][ 0-9] ")


;; Enable liece (Initial file is ~/.liece/init.el)
(autoload 'liece "liece" "liece" t)


;; Enable namazu client
(autoload 'namazu "namazu" nil t) 


;; browse-url の設定
(autoload 'browse-url-at-point "browse-url"
  "Ask a WWW browser to load the URL at or before point." t)
(autoload 'browse-url-at-mouse "browse-url"
  "Ask a WWW browser to load a URL clicked with the mouse." t)
(autoload 'browse-url-of-buffer "browse-url"
  "Ask a WWW browser to display BUFFER." t)
(autoload 'browse-url-of-file "browse-url"
  "Ask a WWW browser to display FILE." t)
(autoload 'browse-url-of-dired-file "browse-url"
  "In Dired, ask a WWW browser to display the file named on this line." t)


;; Enable x-face
(autoload 'x-face-encode "x-face"
  "Generate X-Face string(s) from xbm file." t)
(autoload 'x-face-insert "x-face"
  "Insert X-Face fields." t)
(autoload 'x-face-save "x-face"
  "Save X-Face fields to files." t)
(autoload 'x-face-view "x-face"
  "View X-Face fields." t)
(autoload 'x-face-ascii-view "x-face"
  "View X-Face fields as ascii pictures." t)
;(setq x-face-inhibit-loadup-splash nil)
(setq x-face-image-file-directory "~/images/x-faces")
;(setq x-face-image-file-directory-for-save "~/images/x-faces")
(setq x-face-add-x-face-version-header t)


;; Enable Mew

(autoload 'mew "mew" nil t)
(autoload 'mew-send "mew" nil t)

;(setq mew-icon-directory "/usr/local/share/emacs/21.0.91/etc/mew")
(setq mew-smime-CA-file "/usr/local/ssl/certs/ca-root.crt")
(setq mew-smime-pubkey-dir "/home/sian/.mew-smime-pubkey")

(setq mew-use-biff t)
; Set longer if you check a remote pop server.
(setq mew-pop-biff-interval 1)
(setq mew-passwd-lifetime 24)
(setq mew-passwd-timer-unit 60)
(setq mew-pop-auth 'pass)
(setq mew-pop-server "localhost")
(setq mew-smtp-server "localhost")
(setq mew-use-cached-passwd t)
(setq mew-decode-quoted t)

; x-face
;; (setq mew-use-highlight-x-face t)
;; (setq mew-use-highlight-x-face-function
;;       'x-face-mule-x-face-decode-message-header)
;; (require 'x-face-mule)

; 署名/暗号化に使うprogram
(setq mew-prog-pgp "gpg")

; mew-cite-color.el
(eval-after-load "mew" '(require 'mew-cite-color))

; レンジを聞かない
(setq mew-ask-range nil)

; 起動デモを表示しない
(setq mew-demo nil)

(setq mew-mail-domain-list
      '("big.or.jp"))

(setq mew-from-list
      '("Hiroshi Takekawa "))

; End-of-message, Message is continued
(setq mew-end-of-message-string "[終わりです]")
(setq mew-end-of-part-string "[続いてます]")

; Reply-To: だけにReplyする
(setq mew-replyto-to-list '("Reply-To:"))

; To: には Cc: しない
(setq mew-noreplyto-cc-list '("Cc:"))
(setq mew-replyto-cc-list '("Cc:"))

; 色つけ等の設定
(setq mew-highlight-header-style-subject 'underline)
(setq mew-highlight-header-style-from 'default)
(setq mew-highlight-header-style-to 'default)
;(setq mew-highlight-header-color-important "Purple")

; これがあると素敵 (というか無いと遅くて使い物にならない)
(cond
 ((locate-library "lazy-shot")	;; for XEmacs
  (require 'font-lock)
  (add-hook 'font-lock-mode-hook 'turn-on-lazy-shot)
  (setq lazy-shot-verbose nil)
  (setq lazy-shot-stealth-verbose nil))
 ((locate-library "lazy-lock")	;; for Emacs
  (require 'font-lock)
  (setq font-lock-support-mode 'lazy-lock-mode)))

; 内部で window-system とかの判定はしていません。
(when (and (locate-library "mew-summary-hl") window-system)
  (add-hook 'mew-init-hook (lambda () (require 'mew-summary-hl))))
;; 色が付きすぎて mark 行が目立たないぞ、という人は、こんなのを
;; ~/.emacs に書いておくと mark 行が反転表示になります。
; (defadvice mew-highlight-face-setup (after invert-make-face activate)
;   (when (and (eq flist mew-highlight-mark-face-list)
;              (or mew-use-highlight-mark (featurep 'mew-summary-hl))
;              window-system)
;     (let ((fg (cdr (assoc 'background-color (frame-parameters)))))
;       (mapcar (function
;                (lambda (face)
;                  (invert-face face)
;                  (set-face-foreground face fg)))
;               mew-highlight-mark-face-list))))

; 表示する(されないヘッダはBSで上にscrollすればみれる)ヘッダの設定
(setq mew-field-visible
  '("Subject:" "From:" "To:" "Apparently-To:" "Message-Id:"
    "Cc:" "Newsgroups:" "Date:" "Reply-To:"
    "Resent-From:" "Resent-To:" "Resent-Cc:"
    "Content-Type:" "Content-Transfer-Encoding:"))
(setq mew-field-invisible
  '("Received:" "Return-Path:" "Sender:" "Errors-To:" "Mime-Version:"
    "Resent-Date:" "Resent-Message-Id:" "Resent-Sender:" "Resent-Reply-To:"
    "Delivery-Date:" "Delivered-To:"
    "X-PGP-Sig:" "X-Face:" "X-Priority:" "X-ML-Name:" "X-ML-Driver:" "X-UIDL:"
    "X-Distribute:" "X-Sequence:"
    "List-Post:" "List-Owner:" "List-Help:" "List-Unsubscribe:"
    "From$"))

; 引用記号はmu-citeを使っていれる
(autoload 'mu-cite-original "mu-cite")
(setq mew-cite-hook 'mu-cite-original)
(setq message-cite-function (function mu-cite-original))
(setq mu-cite-top-format
      '(" " id " の記事において\n"
        " " date " ごろに\n"
	" " full-name "<" address "> さんは書きました。\n\n"))

; use enfle w/ mew
(eval-after-load "mew"
  '(setq
    mew-prog-jpeg '("enfle" () t)
    mew-prog-gif  '("enfle" () t)
    mew-prog-png  '("enfle" () t)
    mew-prog-bmp  '("enfle" () t)
    ))

; 定型文書の挿入
(add-hook 'mew-draft-mode-newdraft-hook
	  (function
	   (lambda ()
	     (let ((p (point)))
	       (goto-char (point-max))
	       (insert-file "~/.preface")
	       (goto-char p)))))

; select-xface
(add-hook 'mew-draft-mode-hook
          (function (lambda ()
		      (or (boundp 'select-xface) (require 'select-xface))
		      (define-key (current-local-map) "\C-c\C-x" 'select-xface))))
;(setq select-xface-add-x-face-version-header t)

; Mew の Draft モードで C-c C-i で c-sig を呼び出す
(add-hook 'mew-draft-mode-hook
	  (function
	   (lambda ()
	     (define-key mew-draft-mode-map "\C-c\C-i" 'insert-signature-eref))))

; auto-fill-modeにする
(add-hook 'mew-draft-mode-hook
	  (function (lambda () (auto-fill-mode 1))))

; Mew から browse-url を呼び出す
;; (add-hook 'mew-message-mode-hook
;; 	  (function
;; 	   (lambda ()
;; 	     (local-set-key [mouse-2] 'browse-url-at-mouse))))
;(require 'mew-browse)
;(setq mew-ext-prog-url "/usr/local/mozilla/mozilla")

; refile-view
(add-hook 'mew-init-hook
          '(lambda ()
             (require 'mew-refile-view)
             (define-key mew-summary-mode-map "l" 'mew-refile-view)))

; mew-w3m
(add-hook 'mew-init-hook
          '(lambda ()
             (require 'mew-w3m)
	     (setq mew-prog-html '(mew-mime-text/html-w3m nil nil))
	     (setq mew-use-w3m-minor-mode t)
	     (add-hook 'mew-message-hook 'mew-w3m-minor-mode-setter)))

; 引用部分を考慮したfill
(add-hook 'mew-draft-mode-hook
	  '(lambda ()
	     (setq adaptive-fill-first-line-regexp
		   "[ \t]*\\([-a-z0-9A-Z]\\|\\cj\\)*>+[ \t;#]*\\|[ \t;#]*"
		   adaptive-fill-regexp
		   "[ \t]*\\([-a-z0-9A-Z]\\|\\cj\\)*>+[ \t;#]*\\|[ \t;#]*")))


;;; Set shortcut keys
(global-set-key "\C-x\C-g" 'goto-line)
(global-set-key "\C-xc" 'compile)
(global-set-key "\C-t" 'scroll-down)
; assign transpose-chars C-,
(global-set-key [67108908] 'transpose-chars)
(global-set-key "\C-cl" 'font-lock-fontify-buffer)
(define-key help-map "g" 'apropos)

;; shortcut for mew
(global-set-key "\C-xm" 'mew)

;; shortcut for IRC client
(global-set-key "\C-c\C-i" 'liece)


;;; GENE
;(autoload 'gene-word "gene" "英単語の日本語における意味を調べる" t nil)
;(global-set-key "\C-xw" 'gene-word)


;;; c-sigシステム用の設定
(autoload 'add-signature "c-sig" "c-sig" t)
(autoload 'delete-signature "c-sig" "c-sig" t)
(autoload 'insert-signature-eref "c-sig" "c-sig" t)
(autoload 'insert-signature-automatically "c-sig" "c-sig" t)
(autoload 'insert-signature-randomly "c-sig" "c-sig" t)
(random t)
;(setq sig-insert-end t)
(setq sig-separator "\n")
(setq sig-make-backup-files nil)
; signature内の文字列の自動変換を有効にする
(setq sig-replace-string t)

;; shortcut for c-sig
(global-set-key "\C-c\C-a" 'add-signature)


;;; Enable SKK

;(setq skk-large-jisyo "/path/to/SKK-JISYO.L")
(global-set-key "\C-x\C-j" 'skk-mode)
;(global-set-key "\C-xj" 'skk-auto-fill-mode)
;(global-set-key "\C-xJ" 'register-to-point)
;(global-set-key "\C-xt" 'skk-tutorial)
;(global-set-key "\C-s" 'skk-isearch-forward)
;(global-set-key "\C-r" 'skk-isearch-backward)
(autoload 'skk-mode "skk" nil t)
(autoload 'skk-tutorial "skk-tut" nil t)
(autoload 'skk-isearch-forward "skk-isearch" nil t)
(autoload 'skk-isearch-backward "skk-isearch" nil t)
(autoload 'skk-merge "skk-tools" nil t)
(autoload 'skk-diff "skk-tools" nil t)
(autoload 'skk-check-jisyo "skk-tools" nil t)
(autoload 'skk-isearch-mode-setup "skk-isearch" nil t)
(autoload 'skk-isearch-mode-cleanup "skk-isearch" nil t)
(add-hook 'isearch-mode-hook
          (function (lambda ()
                      (and (boundp 'skk-mode) skk-mode
			   (skk-isearch-mode-setup)))))
(add-hook 'isearch-mode-end-hook
          (function (lambda ()
                      (and (boundp 'skk-mode) skk-mode (skk-isearch-mode-cleanup))
		      (and (boundp 'skk-mode-invoked) skk-mode-invoked
			   (skk-set-cursor-properly)))))


;;;; End of .emacs

(C)Copyright 2001 by Sian <sian@big.or.jp>
Last modified: Thu Feb 26 23:03:06 JST 2004