.emacs.meadow
changeset 26 5b41a49602f1
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/.emacs.meadow	Fri Feb 10 03:44:27 2012 +0900
     1.3 @@ -0,0 +1,174 @@
     1.4 +;;;; -*- mode: emacs-lisp; coding: iso-2022-7bit -*-
     1.5 +;; meadow/cygwin
     1.6 +
     1.7 +(setq exec-path (append exec-path
     1.8 +                        '("c:/cygwin/bin"
     1.9 +                          "c:/cygwin/sbin"
    1.10 +                          "c:/cygwin/usr/local/bin"
    1.11 +                          "c:/Progra~2/Maxima-5.25.1/bin")))
    1.12 +(setq load-path (append load-path '("c:/cygwin/home/swk/lib/elisp"
    1.13 +                                    "c:/cygwin/home/swk/lib/elisp/imaxima")))
    1.14 +
    1.15 +;; MULE-UCS; must be put before set-language-environment
    1.16 +(require 'jisx0213)
    1.17 +;; lang
    1.18 +(set-language-environment "Japanese")
    1.19 +
    1.20 +;; ime
    1.21 +(setq default-input-method "MW32-IME")
    1.22 +(setq-default mw32-ime-mode-line-state-indicator "[--]")
    1.23 +(setq mw32-ime-mode-line-state-indicator-list '("[--]" "[$B$"(B]" "[--]"))
    1.24 +(mw32-ime-initialize)
    1.25 +(add-hook 'mw32-ime-on-hook '(lambda () (set-cursor-color "green")))
    1.26 +(add-hook 'mw32-ime-off-hook '(lambda () (set-cursor-color "black")))
    1.27 +(wrap-function-to-control-ime 'y-or-n-p nil nil)
    1.28 +(wrap-function-to-control-ime 'yes-or-no-p nil nil)
    1.29 +(global-set-key "\C-o" 'toggle-input-method)
    1.30 +
    1.31 +;; mouse cursor
    1.32 +(setq w32-hide-mouse-on-key t)
    1.33 +(setq w32-hide-mouse-timeout 5000)
    1.34 +
    1.35 +;; initial frame
    1.36 +(setq default-frame-alist
    1.37 +      (append (list '(foreground-color . "black")
    1.38 +		    '(background-color . "white")
    1.39 +		    '(border-color . "black")
    1.40 +		    '(mouse-color . "white")
    1.41 +		    '(cursor-color . "black")
    1.42 +		    '(width . 80)
    1.43 +		    '(height . 40)
    1.44 +		    '(top . 10)
    1.45 +		    '(left . 380))
    1.46 +	      default-frame-alist))
    1.47 +
    1.48 +;; fakecygpty
    1.49 +(setq mw32-process-wrapper-alist
    1.50 +     '(("/\\(ssh\\|bash\\|tcsh\\|gpg[esvk]?\\)\\.exe" .
    1.51 +	 (nil . "fakecygpty.exe"))))
    1.52 +
    1.53 +;;; argument-editing
    1.54 +(require 'mw32script)
    1.55 +(mw32script-init)
    1.56 +
    1.57 +;; printing: use ps-print-{buffer,region}[-with-faces]
    1.58 +(setq ps-multibyte-buffer 'non-latin-printer)
    1.59 +(setq ps-lpr-command "c:/Program Files (x86)/Ghostgum/gsview/gsview32.exe")
    1.60 +(setq ps-lpr-switches nil)
    1.61 +(setq ps-printer-name nil)
    1.62 +(setq ps-printer-name-option nil)
    1.63 +(setq ps-paper-type 'a4)
    1.64 +(setq ps-line-number t
    1.65 +      ps-print-header t
    1.66 +      ps-landscape-mode t
    1.67 +      ps-number-of-columns 2)
    1.68 +
    1.69 +;;printing in mew: use mew-summary-print (# key)
    1.70 +(setq mew-print-function 
    1.71 +      '(lambda (&rest args) 
    1.72 +         (let ((ps-left-header (list "(Mail Message)" nil)))
    1.73 +           (apply 'ps-print-buffer-with-faces args))))
    1.74 +
    1.75 +;; imaxima
    1.76 +(autoload 'imaxima "imaxima" "Image support for Maxima." t)
    1.77 +(autoload 'imath-mode "imath" "Interactive Math minor mode." t)
    1.78 +(setq imaxima-gs-program "gswin32c.exe")
    1.79 +(setq imaxima-tmp-dir "C:/Tmp")
    1.80 +(setq imaxima-use-maxima-mode-flag t)
    1.81 +(setq imaxima-image-type 'png)
    1.82 +(eval-after-load "maxima"
    1.83 +  '(define-key inferior-maxima-mode-map "\C-c\t" 
    1.84 +               'inferior-maxima-complete))
    1.85 +
    1.86 +
    1.87 +;; basic preferences
    1.88 +(require 'gnuserv)
    1.89 +(gnuserv-start)
    1.90 +(setq gnuserv-frame (selected-frame))
    1.91 +
    1.92 +(tool-bar-mode -1)
    1.93 +(menu-bar-mode -1)
    1.94 +(column-number-mode t)
    1.95 +(global-font-lock-mode t)
    1.96 +(show-paren-mode nil)
    1.97 +(set-face-background 'show-paren-match-face "lightpink")
    1.98 +
    1.99 +(setq text-mode-hook '(lambda () (auto-fill-mode 1)))
   1.100 +(setq-default fill-column 70)
   1.101 +(setq-default indent-tabs-mode nil)
   1.102 +(setq kill-whole-line nil)
   1.103 +(define-key minibuffer-local-completion-map "\C-w" 'backward-kill-word)
   1.104 +
   1.105 +(require 'uniquify)
   1.106 +(setq uniquify-buffer-name-style 'post-forward-angle-brackets)
   1.107 +
   1.108 +
   1.109 +;; sdic
   1.110 +(setq sdic-eiwa-dictionary-list
   1.111 +      '((sdicf-client "c:/local/eijiro/sdic_sufary/eiji.sdic")
   1.112 +        (sdicf-client "c:/local/eijiro/sdic_sufary/reiji.sdic")
   1.113 +        (sdicf-client "c:/local/eijiro/sdic_sufary/ryaku.sdic")))
   1.114 +(setq sdic-waei-dictionary-list
   1.115 +      '((sdicf-client "c:/local/eijiro/sdic_sufary/waei.sdic")))
   1.116 +
   1.117 +(if (or (boundp 'sdic-eiwa-dictionary-list)
   1.118 +        (boundp 'sdic-waei-dictionary-list))
   1.119 +    (progn
   1.120 +      (autoload 'sdic-describe-word "sdic" "sdic" t nil)
   1.121 +      (autoload 'sdic-describe-region "sdic" "sdic" t nil)
   1.122 +      (global-set-key "\C-cw" 'sdic-describe-word)
   1.123 +      (global-set-key "\C-cr" 'sdic-describe-region)
   1.124 +      (setq sdic-default-coding-system 'euc-japan-unix)
   1.125 +      (setq sdic-window-height 20)
   1.126 +      (setq sdic-face-style 'bold)
   1.127 +      (setq sdic-face-color "firebrick4")
   1.128 +      (defadvice sdic-describe-word 
   1.129 +        (after highlight-phrase-sdic (word &optional search-function) activate)
   1.130 +        (let ((w (replace-regexp-in-string "[/*']" "" word)))
   1.131 +          (unhighlight-regexp w)
   1.132 +          (highlight-phrase w "hi-yellow")))))
   1.133 +
   1.134 +;; shell
   1.135 +(setq explicit-shell-file-name "zsh")
   1.136 +(setq shell-file-name "zsh")
   1.137 +(setq shell-command-switch "-c") 
   1.138 +
   1.139 +;; dev env
   1.140 +(global-set-key "\C-c\C-i" 'complete-symbol)
   1.141 +(global-set-key "\C-cc" 'compile)
   1.142 +(setq compile-command "make ")
   1.143 +(setq compilation-scroll-output t)
   1.144 +(add-hook 'c-mode-common-hook
   1.145 +	  '(lambda ()
   1.146 +	     (c-set-style "K&R")
   1.147 +             (setq c-basic-offset 4)))
   1.148 +
   1.149 +;; sig
   1.150 +(load "sig.el")
   1.151 +(setq signature-file-list
   1.152 +  '("~/.sig-shortest"
   1.153 +    "~/.sig-O"
   1.154 +    "~/.sig-Oe"
   1.155 +    "~/.sig-o-short"))
   1.156 +(wrap-function-to-control-ime 'mail-signature-interactive t "P")
   1.157 +
   1.158 +;; mhc
   1.159 +(load (expand-file-name "~/.mhc.el"))
   1.160 +
   1.161 +;; comment
   1.162 +(global-set-key "\C-c>" 'comment-region)
   1.163 +(global-set-key "\C-c<" 'uncomment-region)
   1.164 +(setq comment-style 'multi-line)
   1.165 +
   1.166 +;; time
   1.167 +(defun insert-current-date-string (arg)
   1.168 +  (interactive "P")
   1.169 +  (insert (let ((system-time-locale "C"))
   1.170 +   (format-time-string (if arg "%Y-%m-%d" "%a %b %e, %Y") (current-time)))))
   1.171 +(global-set-key "\e&" 'insert-current-date-string)
   1.172 +
   1.173 +;; latex
   1.174 +(add-hook 'latex-mode-hook 
   1.175 +          '(lambda () 
   1.176 +             (setq tex-verbatim-face nil) 
   1.177 +             (defun tex-font-lock-suscript () nil)))