root/dotfiles/emacs/mizzy-emacs

Revision 24, 8.0 kB (checked in by mizzy, 4 years ago)

Net::LDAPx::Simple: imported.
SVN::TracWiki: imported.
dotfiles: add .emacs, .screenrc and .zshrc of mizzy
dotfile: add .lftprc of mizzy

Line 
1(set-language-environment 'Japanese)
2;(require 'un-define)
3;(require 'un-tools)
4
5;;(load-library "ecmascript-mode")
6(autoload 'javascript-mode "javascript-mode" "JavaScript mode" t)
7(setq auto-mode-alist (append '(("\\.js$" . javascript-mode))
8                              auto-mode-alist))
9
10(require 'yaml-mode)
11(add-to-list 'auto-mode-alist '("\\.yaml$" . yaml-mode))
12
13(require 'puppet-mode)
14(add-to-list 'auto-mode-alist '("\\.pp$" . puppet-mode))
15
16
17;;python-mode
18;;(setq auto-mode-alist
19;;      (cons '("\\.py$" . python-mode) auto-mode-alist))
20;;(autoload 'python-mode "python-mode" "Python editing mode." t)
21
22;;(add-to-list 'auto-mode-alist '("\\.js\\'" . javascript-mode))
23;;(autoload 'javascript-mode "javascript" nil t)
24;;(setq javascript-indent-level 4)
25
26(autoload 'css-mode "css-mode")
27(setq auto-mode-alist (cons '("\\.css$" . css-mode) auto-mode-alist))
28(setq auto-mode-alist (cons '("\\.js$" . javascript-mode) auto-mode-alist))
29(setq cssm-indent-function #'cssm-c-style-indenter)
30
31;; Wanderlust
32(autoload 'wl "wl" "Wanderlust" t)
33(autoload 'wl-draft "wl-draft" "Write draft with Wanderlust." t)
34;; SEMI/tm ������߂̐ݒ�(setq mime-setup-enable-inline-html nil)
35(load "mime-setup")
36(setq mime-edit-split-message nil)
37
38;;php-mode
39(load-library "php-mode")
40(require 'php-mode)
41(add-hook 'php-mode-user-hook
42          '(lambda ()
43             (setq tab-width 4)
44             (setq c-basic-offset 4)
45             (setq indent-tabs-mode nil)
46             )
47          )
48
49;; IME
50(mw32-ime-initialize)
51(setq default-input-method "MW32-IME")
52
53;; Color mode
54;;(require 'hilit19)
55(global-font-lock-mode 1)
56
57;; coding system
58(set-default-coding-systems 'euc-jp-unix)
59
60;; �����Z�[�u�ݒ�(setq auto-save-defalut nil)            ; disable auto-saving
61(setq make-backup-files nil)            ; don't make *~
62(setq auto-save-list-file-prefix nil)   ; don't make ~/.sav
63
64;;(load "cc-mode")
65
66(w32-add-font
67 "tt-font"
68 
69 '((strict-spec
70    ((:char-spec ascii :height any)
71     (w32-logfont "Courier New" 10 20 400 0 nil nil nil 0 1 3 49))
72    ((:char-spec ascii :height any :weight bold)
73     (w32-logfont "Courier New" 11 20 700 0 nil nil nil 0 1 3 49))
74    ((:char-spec ascii :height any :slant italic)
75     (w32-logfont "Courier New" 11 20 400 0   t nil nil 0 1 3 49))
76    ((:char-spec ascii :height any :weight bold :slant italic)
77     (w32-logfont "Courier New" 11 20 700 0   t nil nil 0 1 3 49))
78    ((:char-spec japanese-jisx0208 :height any)
79     (w32-logfont "�l�r �S�V�b�N" 0 20 400 0 nil nil nil 128 1 3 49))
80    ((:char-spec japanese-jisx0208 :height any :weight bold)
81     (w32-logfont "�l�r �S�V�b�N" 0 20 700 0 nil nil nil 128 1 3 49)
82     ((spacing . -1)))
83    ((:char-spec japanese-jisx0208 :height any :slant italic)
84     (w32-logfont "�l�r �S�V�b�N" 0 20 400 0   t nil nil 128 1 3 49))
85    ((:char-spec japanese-jisx0208 :height any :weight bold :slant italic)
86     (w32-logfont "�l�r �S�V�b�N" 0 20 700 0   t nil nil 128 1 3 49)
87     ((spacing . -1))))))
88(set-face-attribute 'variable-pitch nil :family "Courier New" :height 0.9)
89
90(setq default-frame-alist
91      (append (list
92               '(foreground-color . "#cccccc")
93               '(background-color . "#080808")
94               '(border-color . "black")
95               '(mouse-color . "#473db8")
96               '(cursor-color . "#888888")
97               '(width . 88)
98               '(height . 45);small-fontset
99               '(top . 40)
100               '(left . 350)
101               '(font . "tt-font")
102               '(vertical-scroll-bars . right))
103              default-frame-alist))
104(set-face-background 'modeline "#272d58")
105
106;; IME���p���̃J�[�\���F
107(add-hook 'mw32-ime-on-hook
108          (function (lambda () (set-cursor-color "#473db8"))))
109(add-hook 'mw32-ime-off-hook
110          (function (lambda () (set-cursor-color "#888888"))))
111
112;; for perl
113(defalias 'perl-mode 'cperl-mode)
114
115
116(custom-set-variables
117 '(cperl-close-paren-offset -4)
118 '(cperl-continued-statement-offset 4)
119 '(cperl-indent-level 4)
120 '(cperl-indent-parens-as-block t)
121 '(cperl-tab-always-indent t)
122 )
123
124(setq-default indent-tabs-mode nil)
125
126(global-set-key "%" 'match-paren)
127(defun match-paren (arg)
128  "Go to the matching paren if on a paren; otherwise insert %."
129  (interactive "p")
130  (let ((prev-char (char-to-string (preceding-char)))
131        (next-char (char-to-string (following-char))))
132    (cond ((string-match "[[{(<]" next-char) (forward-sexp 1))
133          ((string-match "[\]})>]" prev-char) (backward-sexp 1))
134          (t (self-insert-command (or arg 1))))))
135
136(add-hook 'cperl-mode-hook '(lambda ()
137                              (make-face 'cperl-nonverridable-face)
138                              (set-face-foreground 'cperl-nonoverridable-face "DimGray")
139                              (setq cperl-nonoverridable-face 'cperl-nonoverridable-face)
140                              (make-face 'cperl-hash-face)
141                              (set-face-foreground 'cperl-hash-face "#cccccc")
142                              (setq cperl-hash-face 'cperl-hash-face)
143                              (make-face 'cperl-array-face)
144                              (set-face-foreground 'cperl-array-face "#cccccc")
145                              (setq cperl-array-face 'cperl-array-face)
146))
147
148(add-hook 'cperl-mode-hook 'outline-minor-mode)
149
150;(iswitchb-default-keybindings)
151
152;; ruby mode
153(autoload 'ruby-mode "ruby-mode"
154  "Mode for editing ruby source files" t)
155(setq auto-mode-alist
156      (append '(("\\.rb$" . ruby-mode)) auto-mode-alist))
157(setq interpreter-mode-alist (append '(("ruby" . ruby-mode))
158                                     interpreter-mode-alist))
159(autoload 'run-ruby "inf-ruby"
160  "Run an inferior Ruby process")
161(autoload 'inf-ruby-keys "inf-ruby"
162  "Set local key defs for inf-ruby in ruby-mode")
163(add-hook 'ruby-mode-hook
164          '(lambda ()
165            (inf-ruby-keys)))
166(global-font-lock-mode 1)
167(setq default-frame-alist
168      (append
169       '((foreground-color . "gray")  ;
170         (background-color . "black") ;
171         (cursor-color     . "blue")  ;
172        )
173       default-frame-alist))
174
175;;(require 'uniquify)
176;;(setq uniquify-buffer-name-style 'post-forward-angle-brackets)
177
178;;(global-set-key "\C-x\C-i" 'indent-region)
179;;(setq completion-ignore-case t)
180
181;;(add-hook 'after-save-hook 'my-chmod-script)
182;;(defun my-chmod-script() (interactive) (save-restriction (widen)
183;; (let ((name (buffer-file-name)))
184;;  (if (and (not (string-match ":" name))
185;;           (not (string-match "/\\.[^/]+$" name))
186;;           (equal "#!" (buffer-substring 1 (min 3 (point-max)))))
187;;     (progn (set-file-modes name (logior (file-modes name) 73))
188;;            (message "Wrote %s (chmod +x)" name)
189;;    ))
190;;)))
191
192(setq scroll-step 1)
193
194(show-paren-mode t)
195
196(transient-mark-mode t)
197
198;; trac-wiki mode
199(require 'trac-wiki)
200(setq trac-projects
201      '(
202        ("puppet"
203         :endpoint "http://trac.mizzy.org/puppet/login/xmlrpc")
204        ("public"
205         :endpoint "http://trac.mizzy.org/public/login/xmlrpc")
206        ("assurer"
207         :endpoint "http://assurer.jp/trac/login/xmlrpc")
208        ))
209
210;; pukiwki mode
211(setq pukiwiki-auto-insert t)
212(autoload 'pukiwiki-edit
213  "pukiwiki-mode" "pukwiki-mode." t)
214(autoload 'pukiwiki-index
215  "pukiwiki-mode" "pukwiki-mode." t)
216(autoload 'pukiwiki-edit-url
217  "pukiwiki-mode" "pukwiki-mode." t)
218(setq
219 pukiwiki-site-list
220 '(("mizzy.org"
221    "http://mizzy.org/pukiwiki/index.php"
222    nil euc-jp-dos)
223   ))
224
225(require 'w3m-load)
226
227;; perltidy
228(defun perltidy-region ()
229  "Run perltidy on the current region."
230  (interactive)
231  (save-excursion
232    (shell-command-on-region (point)
233                             (mark) "perltidy -q" nil t)))
234(defun perltidy-defun ()
235  "Run perltidy on the current defun."
236  (interactive)
237  (save-excursion (mark-defun)
238                  (perltidy-region)))
239
240(require 'html-tt)
241(add-hook 'sgml-mode-hook 'html-tt-load-hook)
242(make-face 'my-sequence-face)
243(set-face-foreground 'my-sequence-face "lightgreen")
244(setq html-tt-sequence-face 'my-sequence-face)
245
246(iswitchb-mode 1)
247(require 'uniquify)
248(setq uniquify-buffer-name-style 'post-forward-angle-brackets)
Note: See TracBrowser for help on using the browser.