diff -r ddae43088f41 -r 5b41a49602f1 .emacs.meadow --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.emacs.meadow Fri Feb 10 03:44:27 2012 +0900 @@ -0,0 +1,174 @@ +;;;; -*- mode: emacs-lisp; coding: iso-2022-7bit -*- +;; meadow/cygwin + +(setq exec-path (append exec-path + '("c:/cygwin/bin" + "c:/cygwin/sbin" + "c:/cygwin/usr/local/bin" + "c:/Progra~2/Maxima-5.25.1/bin"))) +(setq load-path (append load-path '("c:/cygwin/home/swk/lib/elisp" + "c:/cygwin/home/swk/lib/elisp/imaxima"))) + +;; MULE-UCS; must be put before set-language-environment +(require 'jisx0213) +;; lang +(set-language-environment "Japanese") + +;; ime +(setq default-input-method "MW32-IME") +(setq-default mw32-ime-mode-line-state-indicator "[--]") +(setq mw32-ime-mode-line-state-indicator-list '("[--]" "[あ]" "[--]")) +(mw32-ime-initialize) +(add-hook 'mw32-ime-on-hook '(lambda () (set-cursor-color "green"))) +(add-hook 'mw32-ime-off-hook '(lambda () (set-cursor-color "black"))) +(wrap-function-to-control-ime 'y-or-n-p nil nil) +(wrap-function-to-control-ime 'yes-or-no-p nil nil) +(global-set-key "\C-o" 'toggle-input-method) + +;; mouse cursor +(setq w32-hide-mouse-on-key t) +(setq w32-hide-mouse-timeout 5000) + +;; initial frame +(setq default-frame-alist + (append (list '(foreground-color . "black") + '(background-color . "white") + '(border-color . "black") + '(mouse-color . "white") + '(cursor-color . "black") + '(width . 80) + '(height . 40) + '(top . 10) + '(left . 380)) + default-frame-alist)) + +;; fakecygpty +(setq mw32-process-wrapper-alist + '(("/\\(ssh\\|bash\\|tcsh\\|gpg[esvk]?\\)\\.exe" . + (nil . "fakecygpty.exe")))) + +;;; argument-editing +(require 'mw32script) +(mw32script-init) + +;; printing: use ps-print-{buffer,region}[-with-faces] +(setq ps-multibyte-buffer 'non-latin-printer) +(setq ps-lpr-command "c:/Program Files (x86)/Ghostgum/gsview/gsview32.exe") +(setq ps-lpr-switches nil) +(setq ps-printer-name nil) +(setq ps-printer-name-option nil) +(setq ps-paper-type 'a4) +(setq ps-line-number t + ps-print-header t + ps-landscape-mode t + ps-number-of-columns 2) + +;;printing in mew: use mew-summary-print (# key) +(setq mew-print-function + '(lambda (&rest args) + (let ((ps-left-header (list "(Mail Message)" nil))) + (apply 'ps-print-buffer-with-faces args)))) + +;; imaxima +(autoload 'imaxima "imaxima" "Image support for Maxima." t) +(autoload 'imath-mode "imath" "Interactive Math minor mode." t) +(setq imaxima-gs-program "gswin32c.exe") +(setq imaxima-tmp-dir "C:/Tmp") +(setq imaxima-use-maxima-mode-flag t) +(setq imaxima-image-type 'png) +(eval-after-load "maxima" + '(define-key inferior-maxima-mode-map "\C-c\t" + 'inferior-maxima-complete)) + + +;; basic preferences +(require 'gnuserv) +(gnuserv-start) +(setq gnuserv-frame (selected-frame)) + +(tool-bar-mode -1) +(menu-bar-mode -1) +(column-number-mode t) +(global-font-lock-mode t) +(show-paren-mode nil) +(set-face-background 'show-paren-match-face "lightpink") + +(setq text-mode-hook '(lambda () (auto-fill-mode 1))) +(setq-default fill-column 70) +(setq-default indent-tabs-mode nil) +(setq kill-whole-line nil) +(define-key minibuffer-local-completion-map "\C-w" 'backward-kill-word) + +(require 'uniquify) +(setq uniquify-buffer-name-style 'post-forward-angle-brackets) + + +;; sdic +(setq sdic-eiwa-dictionary-list + '((sdicf-client "c:/local/eijiro/sdic_sufary/eiji.sdic") + (sdicf-client "c:/local/eijiro/sdic_sufary/reiji.sdic") + (sdicf-client "c:/local/eijiro/sdic_sufary/ryaku.sdic"))) +(setq sdic-waei-dictionary-list + '((sdicf-client "c:/local/eijiro/sdic_sufary/waei.sdic"))) + +(if (or (boundp 'sdic-eiwa-dictionary-list) + (boundp 'sdic-waei-dictionary-list)) + (progn + (autoload 'sdic-describe-word "sdic" "sdic" t nil) + (autoload 'sdic-describe-region "sdic" "sdic" t nil) + (global-set-key "\C-cw" 'sdic-describe-word) + (global-set-key "\C-cr" 'sdic-describe-region) + (setq sdic-default-coding-system 'euc-japan-unix) + (setq sdic-window-height 20) + (setq sdic-face-style 'bold) + (setq sdic-face-color "firebrick4") + (defadvice sdic-describe-word + (after highlight-phrase-sdic (word &optional search-function) activate) + (let ((w (replace-regexp-in-string "[/*']" "" word))) + (unhighlight-regexp w) + (highlight-phrase w "hi-yellow"))))) + +;; shell +(setq explicit-shell-file-name "zsh") +(setq shell-file-name "zsh") +(setq shell-command-switch "-c") + +;; dev env +(global-set-key "\C-c\C-i" 'complete-symbol) +(global-set-key "\C-cc" 'compile) +(setq compile-command "make ") +(setq compilation-scroll-output t) +(add-hook 'c-mode-common-hook + '(lambda () + (c-set-style "K&R") + (setq c-basic-offset 4))) + +;; sig +(load "sig.el") +(setq signature-file-list + '("~/.sig-shortest" + "~/.sig-O" + "~/.sig-Oe" + "~/.sig-o-short")) +(wrap-function-to-control-ime 'mail-signature-interactive t "P") + +;; mhc +(load (expand-file-name "~/.mhc.el")) + +;; comment +(global-set-key "\C-c>" 'comment-region) +(global-set-key "\C-c<" 'uncomment-region) +(setq comment-style 'multi-line) + +;; time +(defun insert-current-date-string (arg) + (interactive "P") + (insert (let ((system-time-locale "C")) + (format-time-string (if arg "%Y-%m-%d" "%a %b %e, %Y") (current-time))))) +(global-set-key "\e&" 'insert-current-date-string) + +;; latex +(add-hook 'latex-mode-hook + '(lambda () + (setq tex-verbatim-face nil) + (defun tex-font-lock-suscript () nil)))