]> gitweb @ CieloNegro.org - sugar.git/blob - dot-files/_emacs_el
Auto commit by The Sugar System.
[sugar.git] / dot-files / _emacs_el
1 ;; -*- Coding: utf-8 -*-
2
3 ;;General
4 (add-to-list 'load-path (expand-file-name "~/.elisp"))
5 (add-to-list 'load-path "/usr/local/share/emacs/site-lisp")
6 (add-to-list 'load-path "/usr/local/share/emacs/site-lisp/quail-gaelic")
7
8 ;; fink -> pkgsrc
9 (add-to-list 'load-path "/sw/share/emacs/site-lisp")
10 (add-to-list 'load-path "/sw/share/emacs/site-lisp/elcleite")
11
12 ;; Setting for encodings of the environment
13 (set-language-environment 'Japanese)
14 (set-default-coding-systems 'utf-8)
15 (set-terminal-coding-system 'utf-8)
16 (setq default-file-name-coding-system 'utf-8)
17 (set-keyboard-coding-system 'shift_jis-mac)
18 (quail-set-keyboard-layout "jp106")
19
20 (set-clipboard-coding-system 'utf-8)
21 ;(set-clipboard-coding-system 'iso-2022-jp-mac)
22 ;(set-clipboard-coding-system 'shift_jis-mac)
23
24 (setq truncate-partial-width-windows t)
25 (setq make-backup-files nil)
26
27 (setq read-file-name-completion-ignore-case t)
28 (tool-bar-mode nil)
29
30 (global-set-key "\C-\\" 'toggle-input-method)
31
32 (unless window-system
33   (normal-erase-is-backspace-mode t))
34
35 ;; browse-url
36 (setq browse-url-browser-function 'w3m-browse-url)
37 (global-set-key "\C-xm" 'browse-url-at-point)
38
39 (setq-default tab-width 4)
40 (global-font-lock-mode t)
41
42
43 ;; font ------------------------------------------------------------------------
44 (if nil
45     (progn (create-fontset-from-fontset-spec
46             (concat
47              "-*-sindarin-medium-r-normal-*-12-*-*-*-*-*-fontset-sindarin12,"
48              "ascii:-misc-Tengwar Sindarin-medium-r-normal-*-12-*-*-*-*-*-iso10646-1"))
49            (create-fontset-from-fontset-spec
50             (concat
51              "-*-sindarin-medium-r-normal-*-14-*-*-*-*-*-fontset-sindarin14,"
52              "ascii:-misc-Tengwar Sindarin-medium-r-normal-*-14-*-*-*-*-*-iso10646-1"))
53            (create-fontset-from-fontset-spec
54             (concat
55              "-*-sindarin-medium-r-normal-*-16-*-*-*-*-*-fontset-sindarin16,"
56              "ascii:-misc-Tengwar Sindarin-medium-r-normal-*-16-*-*-*-*-*-iso10646-1"))))
57
58
59 ;; Setting for the Mode Line ---------------------------------------------------
60 (line-number-mode t)
61 (column-number-mode t)
62
63 (auto-compression-mode t)
64 (setq visible-bell t)
65 (setq ring-bell-function (lambda ()))
66 (windmove-default-keybindings)
67
68
69 ;; Setting for Frames ----------------------------------------------------------
70 ;(setq default-frame-alist (append default-frame-alist '((cursor-type . hbar)))
71
72
73 ;; Setting for Packages --------------------------------------------------------
74
75 ;; fucking-comma
76 ;(require 'call-the-fucking-comma)
77
78 ;; flyspell
79 (require 'flyspell)
80
81 ;; mic-paren
82 (require 'mic-paren)
83 (paren-activate)
84
85 ;; elscreen
86 (load "elscreen" "ElScreen" t)
87 (require 'elscreen-w3m)
88
89 ;; MPC
90 ;(require 'mpc-autoloads)
91
92 ;; cedet
93 (load-file "/usr/pkg/share/emacs/site-lisp/cedet/common/cedet.el")
94
95 ;; ecb
96 (add-to-list 'load-path "/usr/pkg/share/emacs/site-lisp/ecb")
97 (require 'ecb-autoloads)
98
99 ;; leim
100 (require 'gaelic)
101
102 ;; rnc-mode
103 (autoload 'rnc-mode "rnc-mode")
104 (add-to-list 'auto-mode-alist '("\\.rnc\\'" . rnc-mode))
105
106 ;; bookmark
107 (setq bookmark-sort-flag nil)
108
109 ;; sudoku
110 (autoload 'sudoku "sudoku" "The Sudoku" t)
111
112 ;; mew
113 (autoload 'mew "mew" "Mew" t)
114
115 ;; cleite
116 (autoload 'cleite "cleite" "Cleite RSS Aggregator -- Emacs Interface" t)
117
118 ;; javascript
119 (autoload 'js2-mode "js2" nil t)
120 (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
121
122 ;; ido
123 (require 'ido)
124 (ido-mode t)
125
126 ;; diary and todo
127 (add-hook 'diary-display-hook 'fancy-diary-display)
128 (add-hook 'list-diary-entries-hook 'include-other-diary-files)
129 (add-hook 'diary-hook 'appt-make-list)
130 ;(add-hook 'mark-diary-entries-hook 'mark-included-diary-files)
131
132 (display-time)
133 (diary 0)
134
135 (global-set-key "\C-ct" 'todo-show)
136 (global-set-key "\C-ci" 'todo-insert-item)
137
138 ;; sokoban
139 (autoload 'sokoban "sokoban.el" "Start a new game of Sokoban." t)
140 (autoload 'sokoban-mode "sokoban.el" "Play Sokoban in current buffer." t)
141 (setq sokoban-playerfiles-dir "/usr/local/var/games/emacs-sokoban")
142
143 ;; nXML
144 (load "/usr/pkg/share/emacs/site-lisp/nxml-mode/rng-auto.el")
145 (defalias 'xml-mode 'nxml-mode)
146 (add-to-list 'auto-mode-alist '("\\.xml$" . nxml-mode))
147 (add-to-list 'auto-mode-alist '("\\.xi$" . nxml-mode))
148 (add-to-list 'auto-mode-alist '("\\.rdf$" . nxml-mode))
149 (add-to-list 'auto-mode-alist '("\\.rng$" . nxml-mode))
150
151 ;; sstp
152 (autoload 'sstp-mode "sstp" "SSTP Editing Major-Mode" t)
153
154 ;; scheme
155 (setq scheme-program-name "csi")
156
157 ;; woman
158 (setq woman-manpath
159       '("/usr/local/man"
160         "/usr/local/share/man"
161         "/usr/man"
162         "/usr/share/man"
163         "/sw/share/man"
164         "/usr/local/teTeX/man"
165         "/usr/X11R6/man"))
166 (setq woman-cache-filename "~/.wmncach.el")
167 (setq woman-imenu t)
168 (setq woman-use-own-frame nil)
169
170 ;; ruby-mode
171 (autoload 'ruby-mode "ruby-mode" "Mode for editing ruby source files")
172 (setq auto-mode-alist
173       (append '(("\\.rb$" . ruby-mode)) auto-mode-alist))
174 (setq interpreter-mode-alist (append '(("ruby" .ruby-mode))
175                                      interpreter-mode-alist))
176 (autoload 'run-ruby "inf-ruby" "Run an inferior Ruby process")
177 (autoload 'inf-ruby-keys "inf-ruby" "set local key defs for inf-ruby in ruby-mode")
178 (add-hook 'ruby-mode-hook
179           '(lambda ()
180             (inf-ruby-keys)
181           ))
182
183 ;; Tramp
184 (setq tramp-default-method "ssh")
185
186 ;; Haskell
187 ;(load (expand-file-name "~/sandbox/_haskell/haskell-mode/haskell-site-file"))
188 (add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
189 (add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
190 ;;(add-hook 'haskell-mode-hook 'turn-on-haskell-simple-indent)
191 ;;(add-hook 'haskell-mode-hook 'turn-on-haskell-hugs)
192 (add-hook 'haskell-mode-hook 'turn-on-haskell-ghci)
193 (add-to-list 'auto-mode-alist '("\\.hs$" . haskell-mode))
194 (add-to-list 'auto-mode-alist '("\\.hsc$" . haskell-mode))
195
196 (autoload 'haskell-mode "haskell-mode"
197   "Major mode for editing Haskell scripts." t)
198 (autoload 'literate-haskell-mode "haskell-mode"
199   "Major mode for editing literate Haskell scripts." t)
200
201 ;; Hoogle
202 (autoload 'hoogle-lookup "hoogle" "Hoogle" t)
203 (global-set-key (kbd "C-c h") 'hoogle-lookup)
204
205 ;; c
206 (mapcar (lambda (hook)
207           (add-hook hook
208                     (lambda () (c-set-style "user"))))
209         '(c-mode-hook
210           c++-mode-hook
211           objc-mode-hook
212           java-mode-hook))
213
214 ;; librep
215 (setq auto-mode-alist
216       (append
217        '(("\\.jl$" . lisp-mode))
218        auto-mode-alist))
219
220 ;; css
221 (autoload 'css-mode "css-mode" "For editing CSS file" t)
222 (setq cssm-indent-level 4)
223 (setq cssm-mirror-mode nil)
224 (setq cssm-indent-function 'cssm-c-style-indenter)
225 (setq auto-mode-alist
226       (append
227        '(("\\.css$" . css-mode))
228        auto-mode-alist))
229
230 ;; EmacsWiki
231 (autoload 'emacs-wiki-find-file "emacs-wiki" "Emacs Wiki" t)
232 (defalias 'wiki 'emacs-wiki-find-file)
233
234 ;; gnus
235 (setq gnus-select-method '(nntp "localhost" (nntp-port-number 1119)))
236
237 ;; cperl
238 ;; use cperl-mode instead of perl-mode
239 (defalias 'perl-mode 'cperl-mode)
240 ;; configuration of indent
241 (setq cperl-invalid-face nil)
242 (setq cperl-indent-level 4)
243 (setq cperl-indent-parens-as-block t)
244 ;(global-set-key "\C-c\C-p" 'cperl-mode)
245
246 ;; Mule-UCS
247 ;(unless (getenv "NO_MULE_UCS")
248 ;  (require 'un-define))
249
250 ;; SKK
251 ;(require 'skk-autoloads)
252 (global-set-key "\C-x\C-j" 'skk-mode)
253 (global-set-key "\C-xj" 'skk-auto-fill-mode)
254 (global-set-key "\C-xt" 'skk-tutorial)
255 ;(setq skk-large-jisyo (expand-file-name "~/sandbox/_input-method/skk/dic/SKK-JISYO.L"))
256 ;(setq skk-large-jisyo "/sw/share/ddskk/SKK-JISYO.L")
257 (setq skk-use-jisx0201-input-method t)
258 (setq skk-rom-kana-rule-list
259       '(("@" nil "@")
260         ("wi" nil ("ヰ" . "ゐ"))
261         ("we" nil ("ヱ" . "ゑ"))
262         ;;("hh" "h" ("ン" . "ん"))
263         ;;("mm" "m" ("ン" . "ん"))
264         ("zx" nil ("ゝ" . "ヽ"))
265         ("zc" nil ("ゞ" . "ヾ"))))
266 (set-input-method 'japanese-skk) ; INPUT METHOD
267
268 ;; navi2ch
269 (autoload 'navi2ch "navi2ch" "Navigator for 2ch for Emacs" t)
270
271 ;; migemo
272 (load-library "migemo")
273
274 ;; tiarra-conf
275 (setq load-path (cons (expand-file-name "~/sandbox/Tiarra") load-path))
276 (autoload 'tiarra-conf-mode "tiarra-conf" "tiarra.conf editing mode" t)
277
278 ;; YaTeX
279 ;(autoload 'yatex-mode "yatex" "Yet Another LaTeX mode" t)
280 ;(setq YaTeX-kanji-code 3) ; euc-jp
281 ;(setq tex-command "/usr/local/teTeX/bin/platex")
282 ;(push "/usr/local/teTeX/bin" exec-path)
283 ;(setq auto-mode-alist ;; override default .tex mode rule
284 ;      (cons (cons "\\.tex$" 'yatex-mode) auto-mode-alist))
285
286 ;; po-mode
287 (autoload 'po-mode "po-mode")
288 (setq auto-mode-alist
289       (cons '("\\.po[tx]?\\'\\|\\.po\\." . po-mode)
290             auto-mode-alist))
291
292 ;; ChangeLog
293 (setq user-full-name "PHO")
294 (setq user-mail-address "pho@cielonegro.org")
295
296 (defun memo ()
297   (interactive)
298   (add-change-log-entry nil (expand-file-name "~/sync/memo.txt")))
299 (define-key ctl-x-map "M" #'memo)
300
301 (defun depression ()
302   (interactive)
303   (add-change-log-entry nil (expand-file-name "~/sync/depression.txt")))
304 (define-key ctl-x-map "P" #'depression)
305
306 (defun plant ()
307   (interactive)
308   (add-change-log-entry nil (expand-file-name "~/sync/plant.txt")))
309 (define-key ctl-x-map "G" #'plant)
310
311 ;; Emacs Calc
312 (add-hook 'calc-start-hook
313           (lambda ()
314             (if (functionp 'paren-deactivate)
315                 (paren-deactivate))))
316 (add-hook 'calc-end-hook
317           (lambda ()
318             (if (functionp 'paren-activate)
319                 (paren-activate))))
320
321 ;; hooks
322 (mapcar (lambda (hook)
323           (add-hook hook
324                     (lambda ()
325                       (local-set-key "\C-m" 'newline-and-indent)
326                       (local-set-key "\C-j" 'newline)
327                       )))
328         '(perl-mode-hook
329           cperl-mode-hook
330           java-mode-hook
331           javascript-mode-hook
332           c-mode-hook
333           c++-mode-hook
334           objc-mode-hook
335           emacs-lisp-mode-hook
336           lisp-mode-hook
337           yatex-mode-hook
338           css-mode-hook
339           scheme-mode-hook))
340
341 ;; Wanderlast
342 ;(autoload 'wl "wl" "Wanderlust" t)
343 ;(autoload 'wl-other-frame "wl" "Wanderlust on new frame." t)
344 ;(autoload 'wl-draft "wl-draft" "Write draft with Wanderlust." t)
345
346 ;;; emacs-w3m
347 (autoload 'w3m "w3m" "Interface for w3m on Emacs." t)
348 (autoload 'w3m-browse-url "w3m" "Browse url by w3m." t)
349 (autoload 'w3m-find-file "w3m" "w3m interface function for local file." t)
350 (autoload 'w3m-search "w3m-search" "Search QUERY using SEARCH-ENGINE." t)
351 (autoload 'w3m-weather "w3m-weather" "Display weather report." t)
352 (autoload 'w3m-antenna "w3m-antenna" "Report chenge of WEB sites." t)
353 (autoload 'w3m-namazu "w3m-namazu" "Search files with Namazu." t)
354
355 ;; pov-mode
356 (autoload 'pov-mode "pov-mode" "POV-Ray scene file mode" t)
357 (setq auto-mode-alist
358       (append '(("\\.pov$" . pov-mode)
359                 ("\\.inc$" . pov-mode)
360                 ) auto-mode-alist))
361
362 ;; End of user configuration ---------------------------------------------------
363
364 ;; emacs auto edit
365 (put 'narrow-to-region 'disabled nil)
366 (custom-set-variables
367   ;; custom-set-variables was added by Custom.
368   ;; If you edit it by hand, you could mess it up, so be careful.
369   ;; Your init file should contain only one such instance.
370   ;; If there is more than one, they won't work right.
371  '(Info-additional-directory-list (quote ("/sw/share/info" "/usr/local/info" "/usr/local/share/info")))
372  '(appt-display-format (quote window))
373  '(appt-message-warning-time 20)
374  '(canlock-password "a14fa4d2601465d55585c291fa8b3943e189e716")
375  '(cleite:auto-refresh-interval nil)
376  '(cleite:measure-srpc-call-time t)
377  '(cperl-merge-trailing-else nil)
378  '(ecb-add-path-for-not-matching-files (quote (t)))
379  '(ecb-help-info-path "/sw/share/info/ecb.info")
380  '(ecb-layout-name "left14")
381  '(ecb-options-version "2.32")
382  '(ecb-show-sources-in-directories-buffer (quote always))
383  '(ecb-source-path (quote (("~/sandbox/_web-app/Rakka" "Rakka") ("~/sandbox/_haskell/Lucu" "Lucu") ("~/sandbox/_web-app/Kirschbaum" "Kirschbaum") ("~/sandbox/_haskell/HsOpenSSL" "HsOpenSSL") ("~/sandbox/_haskell/HsHyperEstraier" "HsHyperEstraier") ("~/sandbox/_haskell/HsSVN" "HsSVN") ("~/sandbox/_game/RoRo" "RoRo") ("~/sandbox/_haskell/HXT" "HXT") ("~/src/ghc-6.8.3" "ghc-6.8.3") ("/Users/admin/sandbox/sugar" "sugar") ("/" "/"))))
384  '(ecb-tip-of-the-day nil)
385  '(ecb-tree-buffer-style (quote ascii-guides))
386  '(ecb-windows-width 0.2)
387  '(elscreen-display-tab t)
388  '(haskell-program-name "ghci")
389  '(ido-enable-flex-matching t)
390  '(ido-everywhere t)
391  '(ido-ignore-files (quote ("\\`CVS/" "\\`#" "\\`.#" "\\`\\.\\./" "\\`\\./" "\\.ttc")))
392  '(ido-work-directory-list-ignore-regexps (quote ("^\\(/mnt/ibm/\\|/Volumes/IBM80GB/\\)")))
393  '(indent-tabs-mode nil)
394  '(jabber-nickname "PHO")
395  '(jabber-resource "emacs")
396  '(jabber-server "jabber.jp")
397  '(jabber-username "phonohawk")
398  '(js2-basic-offset 4)
399  '(js2-indent-on-enter-key t)
400  '(js2-use-font-lock-faces t)
401  '(mew-field-spec (quote (("^Resent-\\(From\\|To\\|Cc\\|Date\\)" t mew-face-header-important mew-face-header-important) ("^Subject:$" t mew-face-header-important mew-face-header-subject) ("^From:$" t mew-face-header-important mew-face-header-from) ("^\\(To\\|Apparently-To\\):$" t mew-face-header-important mew-face-header-to) ("^\\(Cc\\|Dcc\\|Bcc\\):$" t mew-face-header-important mew-face-header-to) ("^Newsgroups:$" t mew-face-header-important mew-face-header-to) ("^Date:$" t mew-face-header-important mew-face-header-date) ("^Reply-To:$" t) ("^X-Mailer:$" t) ("^X-Mew:$" t mew-face-header-important mew-face-header-xmew) ("^\\(Received\\|Return-Path\\|Sender\\|Errors-To\\):$" nil) ("^\\(Path\\|Distribution\\|Xref\\):$" nil) ("^NNTP-Posting-" nil) ("^\\(Message-Id\\|Posted\\|In-Reply-To\\|References\\|Precedence\\):$" nil) ("^Delivered-" nil) ("^List-" nil) ("^\\(Mime-Version\\|Lines\\):$" nil) ("^From$" nil) ("^Status:$" nil) ("^Face:$" nil mew-face-header-private mew-face-header-marginal) ("^X-Text-Classification:$" t mew-face-header-important mew-face-header-important) ("^X-POPFile-Link:$" t mew-face-header-important mew-face-body-url) ("^\\(X\\|Original\\)-" nil mew-face-header-private mew-face-header-marginal))))
402  '(mew-refile-guess-alist (quote (("From:" ("noreply@adc1.apple.com" . "+mm/adc") ("mag2 ID 0000022139" . "+mm/2ch") ("noreply@sourceforge.net" . "+from/sf-net")) ("Subject:" ("w3m-dev" . "+ml/w3m-dev")) ("To:" ("glasgow-haskell-users@haskell.org" . "+ml/ghc-users") ("fink-devel@lists.sourceforge.net" . "+ml/fink-devel")) ("Reply-To:" ("yun@kokonoe.com" . "+mm/kokonoe")) ("Cc:" ("glasgow-haskell-users@haskell.org" . "+ml/ghc-users")))))
403  '(mew-scan-fields (quote ("Folder:" "Filename:" "Subject:" "Date:" "From:" "To:" "Cc:" "Content-Type:" "Content-Transfer-Encoding:" "X-Mew-Uidl:" "Message-Id:" "In-Reply-To:" "References:" "X-Mew-Ref:" "X-Text-Classification:" "Body")))
404  '(mew-spam: "X-Text-Classification:")
405  '(mew-summary-form (quote (type (5 date) " " (14 from) " " t (14 x-classification) " " (30 subj) "|" (0 body))))
406  '(mouse-wheel-progessive-speed nil)
407  '(mouse-wheel-scroll-amount (quote (1 ((shift) . 5) ((control)))))
408  '(navi2ch-browse-url-browser-function (quote browse-url-with-firefox))
409  '(navi2ch-mona-face-variable (quote navi2ch-mona16-face))
410  '(navi2ch-mona-on-message-mode t)
411  '(newsticker-html-renderer (quote w3m-region))
412  '(newsticker-url-list nil)
413  '(newsticker-url-list-defaults (quote (("slashdot" "http://slashdot.org/index.rss" nil 3600))))
414  '(nxml-auto-insert-xml-declaration-flag t)
415  '(nxml-slash-auto-complete-flag t)
416  '(rng-schema-locating-files (quote ("schemas.xml" "/sw/share/schema/schemas.xml" "~/share/nxml/schemas.xml")))
417  '(safe-local-variable-values (quote ((todo-categories "Todo" "Todo" "Todo" "Todo"))))
418  '(w3m-bookmark-file-coding-system (quote utf-8))
419  '(w3m-coding-system (quote utf-8))
420  '(w3m-coding-system-priority-list (quote (utf-8)))
421  '(w3m-default-coding-system (quote utf-8))
422  '(w3m-default-display-inline-images t)
423  '(w3m-file-coding-system (quote utf-8))
424  '(w3m-file-name-coding-system (quote utf-8))
425  '(w3m-fill-column 80)
426  '(w3m-input-coding-system (quote utf-8))
427  '(w3m-key-binding nil)
428  '(w3m-output-coding-system (quote utf-8))
429  '(w3m-terminal-coding-system (quote utf-8))
430  '(w3m-use-cookies t)
431  '(x-select-enable-clipboard t))
432 (custom-set-faces
433   ;; custom-set-faces was added by Custom.
434   ;; If you edit it by hand, you could mess it up, so be careful.
435   ;; Your init file should contain only one such instance.
436   ;; If there is more than one, they won't work right.
437  '(flyspell-incorrect ((t (:foreground "OrangeRed" :overline t))))
438  '(which-func-face ((t (:background "black" :foreground "dark orange")))))