;; -*- mode: lisp-interaction; syntax: elisp; coding: iso-2022-7bit -*- ;; last modified: Sun Sep 25 23:02:56 JST 2005 ;; ;; .emacs for Meadow-2.10(ASAGAO) based on dot.emacs.ja ;; ;;================ ;; $BF|K\8l4D6-@_Dj(B ;;================ ;;--------------- ;; Mule-UCS $B@_Dj(B ;;--------------- (require 'un-define) ; Unicode (require 'jisx0213) ; JIS X 0213 ;;---------------- ;; $BF|K\8l4D6-@_Dj(B ;;---------------- (set-language-environment "Japanese") (setq inhibit-startup-message t) ;;============== ;; gnuserv $B@_Dj(B ;;============== (require 'gnuserv) (gnuserv-start) (setq gnuserv-frame (selected-frame)) ;;================ ;; $BF|K\8lF~NO@_Dj(B ;;================ ;;;---------- ;;; IME $B@_Dj(B ;;;---------- ;(mw32-ime-initialize) ;(setq default-input-method "MW32-IME") ;(setq-default mw32-ime-mode-line-state-indicator "[--]") ;(setq mw32-ime-mode-line-state-indicator-list '("[--]" "[$B$"(B]" "[--]")) ;(add-hook 'mw32-ime-on-hook ; (function (lambda () (set-cursor-height 2)))) ;(add-hook 'mw32-ime-off-hook ; (function (lambda () (set-cursor-height 4)))) ;;------------------------------------ ;; YC (Yet another Canna client) $B@_Dj(B ;;------------------------------------ (setq yc-server-host "localhost") ; $B$+$s$J%5!<%P%[%9%HL>(B (setq yc-rK-trans-key "\C-j") (setq yc-use-color t) (setq yc-use-fence (not (eq window-system 'x))) (load "yc") ; $B$3$l$G%U%'%s%9%b!<%I$O;HMQ2DG=(B (global-yc-mode 1) ; $BA4%P%C%U%!$G(B ANK-$B4A;zJQ49$rM-8z$K$9$k(B (global-set-key "\M-\ " 'yc-mode) (setq yc-canna-lib-path "/usr/local/canna/lib/") ; $B$+$s$J$N=i4|@_Dj%Q%9(B (setq yc-canna-dic-path "/usr/local/canna/lib/dic") ; $B$+$s$J$N<-=q%Q%9(B (setq yc-select-count 2) (setq yc-stop-chars "(){}<>") ;;============== ;; $B%+!<%=%k@_Dj(B ;;============== ;(set-cursor-type 'box) ; Meadow-1.10$B8_49(B (SKK$BEy$G?'$,JQ$k@_Dj(B) ;(set-cursor-type 'hairline-caret) ; $B=DK@%-%c%l%C%H(B (setq w32-hide-mouse-on-key t) ; $B%^%&%9%+!<%=%k$r>C$9(B (setq w32-hide-mouse-timeout 5000) ; $B%^%&%9%+!<%=%k$r>C$9(B ;;============== ;; $B%U%)%s%H@_Dj(B ;;============== ;;---------------- ;; font-lock $B@_Dj(B ;;---------------- (global-font-lock-mode t) ;;-------------- ;; fontset $B@_Dj(B ;;-------------- ;(load "~/.emacs.d/bdf14-fontset") ;(and (boundp 'list-faces-sample-text) ; (setq list-faces-sample-text ; "abcde ABCDE 01234 $B$"$$$&$($*(B (I12345(B $B0!0a1+3(8f(B")) ;;----------------------- ;; TrueType $B%U%)%s%H@_Dj(B ;;----------------------- (w32-add-font "private-fontset" '((spec ((:char-spec ascii :height 105) strict (w32-logfont "Courier New" 0 -11 400 0 nil nil nil 0 1 3 49)) ((:char-spec ascii :height 105 :weight bold) strict (w32-logfont "Courier New" 0 -11 700 0 nil nil nil 0 1 3 49)) ((:char-spec ascii :height 105 :slant italic) strict (w32-logfont "Courier New" 0 -11 400 0 t nil nil 0 1 3 49)) ((:char-spec ascii :height 105 :weight bold :slant italic) strict (w32-logfont "Courier New" 0 -11 700 0 t nil nil 0 1 3 49)) ((:char-spec japanese-jisx0208 :height 105) strict (w32-logfont "$B#M#S(B $B%4%7%C%/(B" 0 -14 400 0 nil nil nil 128 1 3 49)) ((:char-spec japanese-jisx0208 :height 105 :weight bold) strict (w32-logfont "$B#M#S(B $B%4%7%C%/(B" 0 -14 700 0 nil nil nil 128 1 3 49) ((spacing . -1))) ((:char-spec japanese-jisx0208 :height 105 :slant italic) strict (w32-logfont "$B#M#S(B $B%4%7%C%/(B" 0 -14 400 0 t nil nil 128 1 3 49)) ((:char-spec japanese-jisx0208 :height 105 :weight bold :slant italic) strict (w32-logfont "$B#M#S(B $B%4%7%C%/(B" 0 -14 700 0 t nil nil 128 1 3 49) ((spacing . -1)))))) (set-face-attribute 'variable-pitch nil :family "*") ;;============== ;; $B%U%l!<%`@_Dj(B ;;============== ;;------------------ ;; $B=i4|%U%l!<%`@_Dj(B ;;------------------ (setq default-frame-alist (append (list '(foreground-color . "black") '(background-color . "LemonChiffon") '(background-color . "gray") '(border-color . "black") '(mouse-color . "white") '(cursor-color . "black") ;; '(ime-font . (w32-logfont "$B#M#S(B $B%4%7%C%/(B" ;; 0 16 400 0 nil nil nil ;; 128 1 3 49)) ; TrueType $B$N$_(B ;; '(font . "bdf-fontset") ; BDF '(font . "private-fontset"); TrueType '(width . 80) '(height . 40) '(top . 0) '(left . 100)) default-frame-alist)) ;;------------------------------ ;; $B%a%K%e!<%P!<(B, $B%9%/%m!<%k%P!<(B ;;------------------------------ ;(menu-bar-mode -1) ;(scroll-bar-mode -1) ;;============ ;; shell $B@_Dj(B ;;============ ;;--------------- ;; bash (Cygwin) ;;--------------- (setq explicit-shell-file-name "bash") (setq shell-file-name "sh") (setq shell-command-switch "-c") ;;----------------------- ;; argument-editing $B@_Dj(B ;;----------------------- (require 'mw32script) (mw32script-init) ;;-------------------- ;; coding-system $B@_Dj(B ;;-------------------- ;(add-hook 'shell-mode-hook ; (lambda () ; (set-buffer-process-coding-system 'undecided-dos 'sjis-unix))) ;; ^M $B$r$H$k(B (add-hook 'comint-output-filter-functions 'shell-strip-ctrl-m nil t) ;; shell-mode$B$G$NJd40(B (for drive letter) (setq shell-file-name-chars "~/A-Za-z0-9_^$!#%&{}@'`.,;()-") ;;================== ;; $B30It%V%i%&%6@_Dj(B ;;================== (setq browse-url-browser-function 'browse-url-msie) (setq browse-url-msie-program ;; "C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE") "C:\\Program Files\\Fenrir & Co\\Sleipnir\\bin\\Sleipnir.exe") (defun browse-url-msie (url arg) (interactive (browse-url-interactive-arg "URL: ")) (if browse-url-msie-program (let ((w32-start-process-show-window t)) (start-process (concat browse-url-msie-program url) nil browse-url-msie-program url)))) ;;(global-set-key [S-mouse-2] 'browse-url-at-mouse) (global-set-key [S-mouse-3] 'browse-url-at-mouse) ;;------- ;; $B0u:~@_Dj(B ;;------- ;; $B$3$N@_Dj$G(B M-x print-buffer RET $B$J$I$G$N0u:~$,$G$-$k$h$&$K$J$j$^$9(B ;; notepad $B$KM?$($k%Q%i%a!<%?$N7A<0$N@_Dj(B ;(define-process-argument-editing "notepad" ; (lambda (x) (general-process-argument-editing-function x nil t))) ;(defun w32-print-region (start end ; &optional lpr-prog delete-text buf display ; &rest rest) ; (interactive) ; (let ((tmpfile (convert-standard-filename (buffer-name))) ; (w32-start-process-show-window t) ; ;; $B$b$7!"(Bdos $BAk$,8+$($F$$$d$J?M$O>e5-$N(B `t' $B$r(B `nil' $B$K$7$^$9(B ; ;; $B$?$@$7!"(B`nil' $B$K$9$k$H(B Meadow $B$,8G$^$k4D6-$b$"$k$+$b$7$l$^$;$s(B ; (coding-system-for-write w32-system-coding-system)) ; (while (string-match "[/\\]" tmpfile) ; (setq tmpfile (replace-match "_" t nil tmpfile))) ; (setq tmpfile (expand-file-name (concat "_" tmpfile "_") ; temporary-file-directory)) ; (write-region start end tmpfile nil 'nomsg) ; (call-process "notepad" nil nil nil "/p" tmpfile) ; (and (file-readable-p tmpfile) (file-writable-p tmpfile) ; (delete-file tmpfile)))) ;(setq print-region-function 'w32-print-region) ;;========== ;; $B>\:Y@_Dj(B ;;========== ;;------------------ ;; $B%P%C%/%"%C%WITMW(B ;;------------------ (setq make-backup-files nil) ;;-------------------- ;; $B%?%$%`%9%?%s%WA^F~(B ;;-------------------- (if (not (memq 'time-stamp write-file-hooks)) (setq write-file-hooks (cons 'time-stamp write-file-hooks))) (setq time-stamp-format "%3a %3b %02d %02H:%02M:%02S %Z %:y") ;(setq time-stamp-format "%:y/%02m/%02d %02H:%02M:%02S") (setq time-stamp-start "last modified:[ \t]") (setq time-stamp-end "$") ;;------------------------- ;; ChangeLog Memo(C-x 4 a) ;;------------------------- (setq user-full-name "URANOV") (setq user-mail-address "URANOV@domainX.jp") ;; memo (defun memo () (interactive) (let ((add-log-current-defun-function 'ignore) (memo-file "~/doc/memo.txt")) (set-buffer (find-file-noselect memo-file)) (add-change-log-entry nil (expand-file-name memo-file)))) (define-key ctl-x-map "M" 'memo) ;;=========================== ;; CMigemo $BF|K\8l%$%s%/%j%a%s%?%k8!:w(B ;;=========================== ;(setq migemo-directory "d:/cygwin/usr/local/share/cmigemo/euc-jp") ;(setq migemo-options (list "-q" "-t" "emacs")) ;;(setq migemo-coding-system 'euc-japan-dos) ;(setq migemo-coding-system 'euc-japan-unix) ;(load-library "cmigemo") ;(migemo-init) ;(setq migemo-isearch-enable-p nil) ;;================== ;; html-helper-mode ;;================== (autoload 'html-helper-mode "html-helper-mode" "Yay HTML" t) (setq auto-mode-alist (append '( ("\\.htm$" . html-helper-mode) ("\\.html$" . html-helper-mode) )auto-mode-alist)) (setq html-helper-do-write-file-hooks t) (setq html-helper-build-new-buffer t) ;;===== ;; Mew ;;===== (autoload 'mew "mew" nil t) (autoload 'mew-send "mew" nil t) (setq mew-demo nil) ;; If using XEmacs/Emacs 21 (setq mew-icon-directory "icon directory") ;; Optional setup (Read Mail menu for Emacs 21): (if (boundp 'read-mail-command) (setq read-mail-command 'mew)) ;; Optional setup (e.g. C-xm for sending a message): (autoload 'mew-user-agent-compose "mew" nil t) (if (boundp 'mail-user-agent) (setq mail-user-agent 'mew-user-agent)) (if (fboundp 'define-mail-user-agent) (define-mail-user-agent 'mew-user-agent 'mew-user-agent-compose 'mew-draft-send-message 'mew-draft-kill 'mew-send-hook)) ;; Summary Line ;(defun mew-summary-form-num () ; (MEW-NUM)) ;(setq mew-summary-form ; `((-5 num) " " type (5 date) " " (14 from) " " t (30 subj) ; ,mew-summary-form-body-starter (0 body))) (setq mew-msg-rm-policy 'always) (setq mew-prog-text/html-ext "C:\\Program Files\\Fenrir & Co\\Sleipnir\\bin\\Sleipnir.exe") (require 'mew-browse) ;; EOF