さくらインターネットのサーバを借りた。

telnet/sshで作業すると速くて快適。
viがあまりにも使いにくいためemacsを導入したが、
これまた不慣れなため使いにくい。
そこで、emacsに慣れるために仕事場でxyzzyを使い始めたので設定をメモ
いろんな方のとこから寄せ集めた。めんどうなので原文ママ

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; C言語関連のコーディングスタイル設定
;(setq *c-indent-tabs-mode* t)          ; インデントはタブを使う
(setq *c-indent-tabs-mode* nil)         ; インデントはスペースを使う

(setq c-indent-level 4)                 ; インデントレベル
(setq c-continued-statement-offset 4)   ; 
(setq c-argdecl-indent 4)               ; 
(setq c-brace-offset -4)                ; 
(setq c-label-offset -0)                ; 
(setq c-comment-indent 1)               ; 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; SKK-IME使用時にCtrl+BackSlashで入力方法が変更されてしまうので、
;; Ctrl+Slashをundoに割当てておく。
(global-set-key #\C-/ 'undo)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; vbs編集時にはbasic-modeを使用する。
(pushnew '("\\.vbs" . basic-mode) *auto-mode-alist* :test 'equal)
  • siteinit.l
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Color (outline-treeのための布石)
(require "color")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Win-Window (outline-treeのための布石)
(require "win-window")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; treeview (outline-treeのための布石)
(require "treeview/setup")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; buf2html (outline-treeのための布石)
(require "buf2html")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; outline-tree
(require "outline-tree/outline-tree")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; マークセット時に選択領域を反転
(require "rv-region")
;(global-set-key #\C-@ 'rv-set-mark-command)
(setq *rv-region-stay-on* t)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; IMEの状態をモードラインに表示
(setq-default mode-line-format "[%i] --%*- %b (%M) [%k:%l] %P %f")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; C-x C-wでemacs風の処理をさせる
(defun emacs-write-file (filename)
(interactive "FWrite file: " :title0 "Write File")
(and (rename filename)
(save-buffer)))
(define-key ctl-x-map #\C-w 'emacs-write-file) 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; インクリメンタルサーチ
(require "isearch")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; grep-dialogのコマンド版
;; 名前を"grep"に既存のするとgrepと置き換わる
 (defun xgrep (pattern directory files)
   (interactive "sgrep: \nDdirectory: \nsfiles: " :history0 'search)
   (require "grepd")
   (let ((ed::*grep-case-fold-search* nil)
         (ed::*grep-regexp-search* t)
         (ed::*grep-subdir* t)
         (ed::*grep-name-only* nil))
     (ed::scan-files pattern (split-string files #\; t " ") directory)))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; C言語モードでTABが入力できません。
;; Ctrl-Qを押してから、TABを押せば入ります。毎回それをするのが嫌な方は
(define-key ed::*c-mode-map* #\tab 'self-insert-command)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; .xyzzy を lisp-mode で編集する
(pushnew '("\\.xyzzy$" . lisp-mode) *auto-mode-alist*)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ctags.lを使う
(load-library "ctags")
; ctags.exe へのパス
(setf *ctags-command-path* (merge-pathnames "etc/ctags.exe" (si:system-root)));
; ctags.exe へのその他のオプション
;(setf *ctags-command-option* "")
; キーバインド
(global-set-key #\M-. 'ctags-jump-tag)
(global-set-key #\M-\, 'ctags-back-tag-jump)
(global-set-key #\M-/ 'ctags-make-tags-file-recursive)
(global-set-key #\M-? 'ctags-select-stack)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; www-mode
(autoload 'www "www/www" t)	                    ; 通常起動
(autoload 'www-open-url "www/www" t)            ; URLを指定して起動
(autoload 'www-open-local-file "www/www" t)     ; ローカルのファイルを指定して開く
(autoload 'www-open-current-buffer "www/www" t)	; 現在のバッファのファイルを開く

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; プログラムソースなどで,インデントをタブで行う人が結構います.
;; まあ,本当はよいことではないのでしょうが・・・
;; そんな人には以下の設定で Tabキーから常にタブを入力.
(let ((keymap (make-sparse-keymap))) 
(define-key keymap #\TAB 'self-insert-command) 
(add-hook '*create-buffer-hook* 
 #'(lambda (buffer) 
 (set-minor-mode-map keymap buffer))))