|
1 ;;;; -*- mode: emacs-lisp; coding: iso-2022-7bit -*- |
|
2 ;; meadow/cygwin |
|
3 |
|
4 (setq exec-path (append exec-path |
|
5 '("c:/cygwin/bin" |
|
6 "c:/cygwin/sbin" |
|
7 "c:/cygwin/usr/local/bin" |
|
8 "c:/Progra~2/Maxima-5.25.1/bin"))) |
|
9 (setq load-path (append load-path '("c:/cygwin/home/swk/lib/elisp" |
|
10 "c:/cygwin/home/swk/lib/elisp/imaxima"))) |
|
11 |
|
12 ;; MULE-UCS; must be put before set-language-environment |
|
13 (require 'jisx0213) |
|
14 ;; lang |
|
15 (set-language-environment "Japanese") |
|
16 |
|
17 ;; ime |
|
18 (setq default-input-method "MW32-IME") |
|
19 (setq-default mw32-ime-mode-line-state-indicator "[--]") |
|
20 (setq mw32-ime-mode-line-state-indicator-list '("[--]" "[$B$"(B]" "[--]")) |
|
21 (mw32-ime-initialize) |
|
22 (add-hook 'mw32-ime-on-hook '(lambda () (set-cursor-color "green"))) |
|
23 (add-hook 'mw32-ime-off-hook '(lambda () (set-cursor-color "black"))) |
|
24 (wrap-function-to-control-ime 'y-or-n-p nil nil) |
|
25 (wrap-function-to-control-ime 'yes-or-no-p nil nil) |
|
26 (global-set-key "\C-o" 'toggle-input-method) |
|
27 |
|
28 ;; mouse cursor |
|
29 (setq w32-hide-mouse-on-key t) |
|
30 (setq w32-hide-mouse-timeout 5000) |
|
31 |
|
32 ;; initial frame |
|
33 (setq default-frame-alist |
|
34 (append (list '(foreground-color . "black") |
|
35 '(background-color . "white") |
|
36 '(border-color . "black") |
|
37 '(mouse-color . "white") |
|
38 '(cursor-color . "black") |
|
39 '(width . 80) |
|
40 '(height . 40) |
|
41 '(top . 10) |
|
42 '(left . 380)) |
|
43 default-frame-alist)) |
|
44 |
|
45 ;; fakecygpty |
|
46 (setq mw32-process-wrapper-alist |
|
47 '(("/\\(ssh\\|bash\\|tcsh\\|gpg[esvk]?\\)\\.exe" . |
|
48 (nil . "fakecygpty.exe")))) |
|
49 |
|
50 ;;; argument-editing |
|
51 (require 'mw32script) |
|
52 (mw32script-init) |
|
53 |
|
54 ;; printing: use ps-print-{buffer,region}[-with-faces] |
|
55 (setq ps-multibyte-buffer 'non-latin-printer) |
|
56 (setq ps-lpr-command "c:/Program Files (x86)/Ghostgum/gsview/gsview32.exe") |
|
57 (setq ps-lpr-switches nil) |
|
58 (setq ps-printer-name nil) |
|
59 (setq ps-printer-name-option nil) |
|
60 (setq ps-paper-type 'a4) |
|
61 (setq ps-line-number t |
|
62 ps-print-header t |
|
63 ps-landscape-mode t |
|
64 ps-number-of-columns 2) |
|
65 |
|
66 ;;printing in mew: use mew-summary-print (# key) |
|
67 (setq mew-print-function |
|
68 '(lambda (&rest args) |
|
69 (let ((ps-left-header (list "(Mail Message)" nil))) |
|
70 (apply 'ps-print-buffer-with-faces args)))) |
|
71 |
|
72 ;; imaxima |
|
73 (autoload 'imaxima "imaxima" "Image support for Maxima." t) |
|
74 (autoload 'imath-mode "imath" "Interactive Math minor mode." t) |
|
75 (setq imaxima-gs-program "gswin32c.exe") |
|
76 (setq imaxima-tmp-dir "C:/Tmp") |
|
77 (setq imaxima-use-maxima-mode-flag t) |
|
78 (setq imaxima-image-type 'png) |
|
79 (eval-after-load "maxima" |
|
80 '(define-key inferior-maxima-mode-map "\C-c\t" |
|
81 'inferior-maxima-complete)) |
|
82 |
|
83 |
|
84 ;; basic preferences |
|
85 (require 'gnuserv) |
|
86 (gnuserv-start) |
|
87 (setq gnuserv-frame (selected-frame)) |
|
88 |
|
89 (tool-bar-mode -1) |
|
90 (menu-bar-mode -1) |
|
91 (column-number-mode t) |
|
92 (global-font-lock-mode t) |
|
93 (show-paren-mode nil) |
|
94 (set-face-background 'show-paren-match-face "lightpink") |
|
95 |
|
96 (setq text-mode-hook '(lambda () (auto-fill-mode 1))) |
|
97 (setq-default fill-column 70) |
|
98 (setq-default indent-tabs-mode nil) |
|
99 (setq kill-whole-line nil) |
|
100 (define-key minibuffer-local-completion-map "\C-w" 'backward-kill-word) |
|
101 |
|
102 (require 'uniquify) |
|
103 (setq uniquify-buffer-name-style 'post-forward-angle-brackets) |
|
104 |
|
105 |
|
106 ;; sdic |
|
107 (setq sdic-eiwa-dictionary-list |
|
108 '((sdicf-client "c:/local/eijiro/sdic_sufary/eiji.sdic") |
|
109 (sdicf-client "c:/local/eijiro/sdic_sufary/reiji.sdic") |
|
110 (sdicf-client "c:/local/eijiro/sdic_sufary/ryaku.sdic"))) |
|
111 (setq sdic-waei-dictionary-list |
|
112 '((sdicf-client "c:/local/eijiro/sdic_sufary/waei.sdic"))) |
|
113 |
|
114 (if (or (boundp 'sdic-eiwa-dictionary-list) |
|
115 (boundp 'sdic-waei-dictionary-list)) |
|
116 (progn |
|
117 (autoload 'sdic-describe-word "sdic" "sdic" t nil) |
|
118 (autoload 'sdic-describe-region "sdic" "sdic" t nil) |
|
119 (global-set-key "\C-cw" 'sdic-describe-word) |
|
120 (global-set-key "\C-cr" 'sdic-describe-region) |
|
121 (setq sdic-default-coding-system 'euc-japan-unix) |
|
122 (setq sdic-window-height 20) |
|
123 (setq sdic-face-style 'bold) |
|
124 (setq sdic-face-color "firebrick4") |
|
125 (defadvice sdic-describe-word |
|
126 (after highlight-phrase-sdic (word &optional search-function) activate) |
|
127 (let ((w (replace-regexp-in-string "[/*']" "" word))) |
|
128 (unhighlight-regexp w) |
|
129 (highlight-phrase w "hi-yellow"))))) |
|
130 |
|
131 ;; shell |
|
132 (setq explicit-shell-file-name "zsh") |
|
133 (setq shell-file-name "zsh") |
|
134 (setq shell-command-switch "-c") |
|
135 |
|
136 ;; dev env |
|
137 (global-set-key "\C-c\C-i" 'complete-symbol) |
|
138 (global-set-key "\C-cc" 'compile) |
|
139 (setq compile-command "make ") |
|
140 (setq compilation-scroll-output t) |
|
141 (add-hook 'c-mode-common-hook |
|
142 '(lambda () |
|
143 (c-set-style "K&R") |
|
144 (setq c-basic-offset 4))) |
|
145 |
|
146 ;; sig |
|
147 (load "sig.el") |
|
148 (setq signature-file-list |
|
149 '("~/.sig-shortest" |
|
150 "~/.sig-O" |
|
151 "~/.sig-Oe" |
|
152 "~/.sig-o-short")) |
|
153 (wrap-function-to-control-ime 'mail-signature-interactive t "P") |
|
154 |
|
155 ;; mhc |
|
156 (load (expand-file-name "~/.mhc.el")) |
|
157 |
|
158 ;; comment |
|
159 (global-set-key "\C-c>" 'comment-region) |
|
160 (global-set-key "\C-c<" 'uncomment-region) |
|
161 (setq comment-style 'multi-line) |
|
162 |
|
163 ;; time |
|
164 (defun insert-current-date-string (arg) |
|
165 (interactive "P") |
|
166 (insert (let ((system-time-locale "C")) |
|
167 (format-time-string (if arg "%Y-%m-%d" "%a %b %e, %Y") (current-time))))) |
|
168 (global-set-key "\e&" 'insert-current-date-string) |
|
169 |
|
170 ;; latex |
|
171 (add-hook 'latex-mode-hook |
|
172 '(lambda () |
|
173 (setq tex-verbatim-face nil) |
|
174 (defun tex-font-lock-suscript () nil))) |