4.25.2009

私の.zshrcと.emacs―― 一番大切なファイル。

coLinuxを起動しようとしたら、どういう訳かブルースクリーンに。
ものすごく久しぶりに遭遇した青一面の画面だっただけに少々驚いたが、そういえばcoLinuxはこういうリスクもはらんでいるんだったと再確認。

そんでもって、やっぱりバックアップしておいた方が良さそうだと思うファイルをブログに貼り付けて保存しておこうと決意したワケ。
以前のソフトサポート用ブログは既に削除してしまったので、あちらに取ってあったバックアップが無いのだということに気づいたってのも一つの理由だけれども。

まずは.zshrc。
環境変数は.zprofileで設定してあるけど、それほど複雑じゃないから省略。

autoload -U compinit
compinit
bindkey -e
setopt auto_cd
setopt auto_pushd
setopt correct
setopt list_packed
setopt nolist_beep
setopt hist_ignore_dups
setopt share_history
export LSCOLORS=ExFxCxdxBxegedabagacad
export LS_COLORS='di=01;34:ln=01;35:so=01;32:ex=01;31:bd=46;34:cd=43;34:su=41;30:sg=46;30:tw=42;30:o
w=43;30'
zstyle ':completion:*' list-colors 'di=;34;1' 'ln=;35;1' 'so=;32;1' 'ex=31;1' 'bd=46;34' 'cd=43;34'

# Lines configured by zsh-newuser-install
HISTFILE='/home/hogehoge/.histfile'
HISTSIZE=10000
SAVEHIST=10000
PROMPT='[%D{%Y/%m/%d(%a)} %T <%(5~,%-2~/.../%2~,%~)>]
[%n@%m]%# '

# command aliases
alias ls='ls -B --color=auto'
alias ll='ls -ABl --color=auto'
alias la='ls -al --color=auto'
alias less='lv'
alias rm='rm -rf'


つづいて.emacs
(setq inhibit-startup-message t)
(setq scroll-step 1)

(set-locale-environment nil)
(coding-system-put 'utf-8 'category 'utf-8)
(set-language-info
"Japanese"
'coding-priority (cons 'utf-8
(get-language-info "Japanese" 'coding-priority)))
(set-language-environment "Japanese")
(set-default-coding-systems 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-buffer-file-coding-system 'utf-8)
(setq default-buffer-file-coding-system 'utf-8)
(global-font-lock-mode t)
(setq backup-inhibited t)
(setq delete-auto-save-file t)

;;Anthy
(load-library "anthy")

;;uim
(setq default-input-method "japanese-anthy-uim")
(setq uim-default-im-prop '("action_anthy_hiragana"))
(setq uim-candidate-display-inline t)

;;slime
(add-to-list 'load-path "/usr/share/emacs/site-lisp/slime/")
(add-hook 'lisp-mode-hook (lambda ()
(slime-mode t)
(show-paren-mode)))

(require 'slime)
(setq inferior-lisp-program "clisp")
(slime-autodoc-mode)

;; scheme-mode
(autoload 'scheme-mode "scheme-mode" "scheme" t)
(setq auto-mode-alist (cons '("\.ss$" . scheme-mode) auto-mode-alist))

;; html-helper-mode
(autoload 'html-helper-mode "html-helper-mode" "Yay HTML" t)
(setq auto-mode-alist (cons '("\.html$" . html-helper-mode) auto-mode-alist))

;; css-mode
(autoload 'css-mode "css-mode" "Editing CSS" t)
(setq auto-mode-alist (cons '("\.css$" . css-mode) auto-mode-alist))

;;cedet
(require 'cedet)
(global-ede-mode t)
(semantic-load-enable-code-helpers)
;; region
(setq transient-mark-mode t)

;; show clock
(display-time)

;; show column number
(column-number-mode t)

;; scheme
(setq process-coding-system-alist
(cons '("gosh" utf-8 . utf-8) process-coding-system-alist))

;; gosh interpriter path. -i option is interactive mode
(setq gosh-program-name "/usr/bin/gosh -i")

;; scheme-mode and run-scheme-mode use to cmuscheme.el
(autoload 'scheme-mode "cmuscheme" "Major mode for Scheme." t)
(autoload 'run-scheme "cmuscheme" "Run an inferior Scheme process." t)

;; pair of brace
(show-paren-mode)

;; indent
(put 'and-let* 'scheme-indent-function 1)
(put 'begin0 'scheme-indent-function 0)
(put 'call-with-client-socket 'scheme-indent-function 1)
(put 'call-with-input-conversion 'scheme-indent-function 1)
(put 'call-with-input-file 'scheme-indent-function 1)
(put 'call-with-input-process 'scheme-indent-function 1)
(put 'call-with-input-string 'scheme-indent-function 1)
(put 'call-with-iterator 'scheme-indent-function 1)
(put 'call-with-output-conversion 'scheme-indent-function 1)
(put 'call-with-output-file 'scheme-indent-function 1)
(put 'call-with-output-string 'scheme-indent-function 0)
(put 'call-with-temporary-file 'scheme-indent-function 1)
(put 'call-with-values 'scheme-indent-function 1)
(put 'dolist 'scheme-indent-function 1)
(put 'dotimes 'scheme-indent-function 1)
(put 'if-match 'scheme-indent-function 2)
(put 'let*-values 'scheme-indent-function 1)
(put 'let-args 'scheme-indent-function 2)
(put 'let-keywords* 'scheme-indent-function 2)
(put 'let-match 'scheme-indent-function 2)
(put 'let-optionals* 'scheme-indent-function 2)
(put 'let-syntax 'scheme-indent-function 1)
(put 'let-values 'scheme-indent-function 1)
(put 'let/cc 'scheme-indent-function 1)
(put 'let1 'scheme-indent-function 2)
(put 'letrec-syntax 'scheme-indent-function 1)
(put 'make 'scheme-indent-function 1)
(put 'multiple-value-bind 'scheme-indent-function 2)
(put 'match 'scheme-indent-function 1)
(put 'parameterize 'scheme-indent-function 1)
(put 'parse-options 'scheme-indent-function 1)
(put 'receive 'scheme-indent-function 2)
(put 'rxmatch-case 'scheme-indent-function 1)
(put 'rxmatch-cond 'scheme-indent-function 0)
(put 'rxmatch-if 'scheme-indent-function 2)
(put 'rxmatch-let 'scheme-indent-function 2)
(put 'syntax-rules 'scheme-indent-function 1)
(put 'unless 'scheme-indent-function 1)
(put 'until 'scheme-indent-function 1)
(put 'when 'scheme-indent-function 1)
(put 'while 'scheme-indent-function 1)
(put 'with-builder 'scheme-indent-function 1)
(put 'with-error-handler 'scheme-indent-function 0)
(put 'with-error-to-port 'scheme-indent-function 1)
(put 'with-input-conversion 'scheme-indent-function 1)
(put 'with-input-from-port 'scheme-indent-function 1)
(put 'with-input-from-process 'scheme-indent-function 1)
(put 'with-input-from-string 'scheme-indent-function 1)
(put 'with-iterator 'scheme-indent-function 1)
(put 'with-module 'scheme-indent-function 1)
(put 'with-output-conversion 'scheme-indent-function 1)
(put 'with-output-to-port 'scheme-indent-function 1)
(put 'with-output-to-process 'scheme-indent-function 1)
(put 'with-output-to-string 'scheme-indent-function 1)
(put 'with-port-locking 'scheme-indent-function 1)
(put 'with-string-io 'scheme-indent-function 1)
(put 'with-time-counter 'scheme-indent-function 1)
(put 'with-signal-handlers 'scheme-indent-function 1)
(put 'with-locking-mutex 'scheme-indent-function 1)
(put 'guard 'scheme-indent-function 1)

;; memo
(setq user-full-name "hogehoge")
(setq user-mail-address "e-mail@example.jp")
(defun memo ()
(interactive)
(add-change-log-entry
nil
(expand-file-name "~/.memo/memo.txt")))
(define-key ctl-x-map "M" 'memo)

;; password hide
(add-hook 'comint-output-filter-functions
'comint-watch-for-password-prompt)

;; c-mode hook
(add-hook 'c-mode-hook
'(lambda ()
(c-set-style "BSD")))

(add-hook 'c++-mode-hook
'(lambda ()
(c-set-style "BSD")))
;; ls color mode off
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)

;; w3m
(require 'w3m-load)

;; wget-el
(load "w3m-wget")


.emacsが長いのはご愛敬。

# ブルースクリーンになった原因が、昨日のお引っ越しじゃなきゃいいんだけど……。

0 件のコメント: