1 ;; -*- Mode: emacs-lisp; Coding: utf-8 -*-
3 ;; Load paths -----------------------------------------------------------------
4 (add-to-list 'load-path (expand-file-name "~/.elisp"))
5 (add-to-list 'load-path "/usr/local/share/emacs/site-lisp")
7 ;; Setting for encodings of the environment -----------------------------------
8 (set-language-environment 'Japanese)
9 (set-default-coding-systems 'utf-8)
10 (set-terminal-coding-system 'utf-8)
11 (setq default-file-name-coding-system 'utf-8)
12 (set-keyboard-coding-system 'utf-8)
13 (set-clipboard-coding-system 'utf-8)
15 ;; Settings for the Emacs itself ----------------------------------------------
16 (setq truncate-partial-width-windows t)
17 (setq make-backup-files nil)
19 (setq read-file-name-completion-ignore-case t)
22 (global-set-key "\C-\\" 'toggle-input-method)
25 (normal-erase-is-backspace-mode t))
27 (setq-default tab-width 4)
28 (global-font-lock-mode t)
30 (auto-compression-mode t)
32 (setq ring-bell-function (lambda ()))
33 (windmove-default-keybindings)
37 ;; Host specific configuration ------------------------------------------------
38 (let ((host (system-name)))
39 (cond ((equal host "aria.cielonegro.org")
40 (setq browse-url-firefox-program "/opt/local/bin/firefox"))))
42 ;; Settings for Browser --------------------------------------------------------
43 (setq browse-url-browser-function 'w3m-browse-url)
44 (global-set-key "\C-xm" 'browse-url-at-point)
46 ;; Setting for the Mode Line ---------------------------------------------------
48 (column-number-mode t)
51 ;; Setting for Frames ----------------------------------------------------------
53 (set-default-font "Inconsolata-14")
54 (set-face-font 'variable-pitch "Inconsolata-14")
55 (set-fontset-font (frame-parameter nil 'font)
57 '("Takaoゴシック" . "unicode-bmp")))
60 ; (add-to-list 'default-frame-alist
61 ; '(font . "Bitstream Vera Sans Mono 12"))
62 ; (set-frame-font "Bitstream Vera Sans Mono 12")
63 ; (set-fontset-font nil;(frame-parameter nil 'font)
65 ; '("Hiragino Kaku Gothic Pro W3" . "unicode-bmp")))
67 ;; Hooks for newline-and-indent ------------------------------------------------
68 ;(mapcar (lambda (hook)
71 ; (local-set-key "\C-m" 'newline-and-indent)
72 ; (local-set-key "\C-j" 'newline)
77 ; javascript-mode-hook
81 ; emacs-lisp-mode-hook
87 ;; Setting for Packages --------------------------------------------------------
88 (defun require-if-present (feature)
92 (if (equal (cadr e) "Cannot open load file")
93 (message "Warning: feature %s is absent" feature) ; warn and ignore
94 (apply 'signal (car e) (cdr e)))))) ; rethrow
96 (defun load-if-present (file)
100 (if (equal (cadr e) "Cannot open load file")
101 (message "Warning: file named %s is absent" file) ; warn and ignore
102 (apply 'signal (car e) (cdr e)))))) ; rethrow
104 (defun load-file-if-present (path)
105 (if (file-exists-p path)
107 (message "Warning: file %s is absent" path)))
110 (require-if-present 'flyspell)
113 (require-if-present 'jaspace)
116 (require-if-present 'auto-complete-config)
117 (if (featurep 'auto-complete-config)
119 (add-to-list 'ac-dictionary-directories
120 "/usr/pkg/share/emacs/site-lisp/auto-complete/ac-dict")
121 (mapcar (lambda (mode)
122 (add-to-list 'ac-modes mode))
125 (add-hook 'erlang-mode-hook
127 (add-to-list 'ac-sources 'ac-source-semantic)))
128 (ac-config-default)))
131 (require-if-present 'mic-paren)
132 (if (featurep 'mic-paren)
136 (load "elscreen" "ElScreen" t)
137 (require-if-present 'elscreen-w3m)
140 (require-if-present 'undo-tree)
141 (global-undo-tree-mode)
144 ;(require-if-present 'mpc-autoloads)
147 (autoload 'rst-mode "rst"
148 "mode for editing reStructuredText documents" t)
149 (setq auto-mode-alist
150 (append '(("\\.rst$" . rst-mode)
151 ("\\.rest$" . rst-mode)) auto-mode-alist))
154 (autoload 'lua-mode "lua-mode" "Lua editing mode." t)
155 (add-to-list 'auto-mode-alist '("\\.lua$" . lua-mode) auto-mode-alist)
158 (require-if-present 'twittering-mode)
159 (setq twittering-username "phonohawk")
162 (load-file-if-present "/usr/pkg/share/emacs/site-lisp/cedet/common/cedet.el")
165 (autoload 'riece "riece" "Start Riece" t)
166 (add-hook 'riece-after-load-startup-hook
168 (add-to-list 'riece-addons 'riece-alias)
169 (add-to-list 'riece-addons 'riece-skk-kakutei)
170 (add-to-list 'riece-addons 'riece-keyword)
171 (add-to-list 'riece-addons 'riece-ctlseq)))
174 (require-if-present 'ecb-autoloads)
175 (let* ((hosts '(("netbsd." .
176 (("~/sandbox/yxmimeproc" "yxmimeproc")
177 ("~/sandbox/YxMIME" "YxMIME.pm")
180 (("~/sandbox/MR/engine/libycom" "libycom")
182 ("aria.cielonegro.org" .
183 (("~/sandbox/_web-app/Rakka" "Rakka")
184 ("~/sandbox/_haskell/Lucu" "Lucu")
185 ("~/sandbox/_web-app/Kirschbaum" "Kirschbaum")
186 ("~/sandbox/_haskell/HsOpenSSL" "HsOpenSSL")
187 ("~/sandbox/_haskell/HsHyperEstraier" "HsHyperEstraier")
188 ("~/sandbox/_haskell/HsSVN" "HsSVN")
189 ("~/sandbox/_game/RoRo" "RoRo")
190 ("~/sandbox/_haskell/HXT" "HXT")
191 ("~/sandbox/_haskell/hxt-compile" "hxt-compile")
192 ("~/src/ghc-6.10.1" "ghc-6.10.1")
193 ("~/sandbox/sugar" "sugar")
194 ("~/sandbox/_haskell/dns" "dns")
195 ("~/sandbox/_haskell/blackboard-ddns" "blackboard-ddns")
197 (paths (cdr (assoc (system-name) hosts))))
198 (setq ecb-source-path paths))
201 (require-if-present 'gaelic)
204 (autoload 'rnc-mode "rnc-mode")
205 (add-to-list 'auto-mode-alist '("\\.rnc\\'" . rnc-mode))
208 (setq bookmark-sort-flag nil)
211 (autoload 'sudoku "sudoku" "The Sudoku" t)
214 (autoload 'mew "mew" "Mew" t)
217 (autoload 'cleite "cleite" "Cleite RSS Aggregator -- Emacs Interface" t)
220 (autoload 'js2-mode "js2" nil t)
221 (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
228 (autoload 'sokoban "sokoban.el" "Start a new game of Sokoban." t)
229 (autoload 'sokoban-mode "sokoban.el" "Play Sokoban in current buffer." t)
230 (setq sokoban-playerfiles-dir "/usr/local/var/games/emacs-sokoban")
233 (load-file-if-present "/usr/pkg/share/emacs/site-lisp/nxml-mode/rng-auto.el")
234 (defalias 'xml-mode 'nxml-mode)
235 (add-to-list 'auto-mode-alist '("\\.xml$" . nxml-mode))
236 (add-to-list 'auto-mode-alist '("\\.xi$" . nxml-mode))
237 (add-to-list 'auto-mode-alist '("\\.rdf$" . nxml-mode))
238 (add-to-list 'auto-mode-alist '("\\.rng$" . nxml-mode))
241 (autoload 'sstp-mode "sstp" "SSTP Editing Major-Mode" t)
244 (autoload 'ruby-mode "ruby-mode" "Mode for editing ruby source files")
245 (setq auto-mode-alist
246 (append '(("\\.rb$" . ruby-mode)) auto-mode-alist))
247 (setq interpreter-mode-alist (append '(("ruby" .ruby-mode))
248 interpreter-mode-alist))
249 (autoload 'run-ruby "inf-ruby" "Run an inferior Ruby process")
250 (autoload 'inf-ruby-keys "inf-ruby" "set local key defs for inf-ruby in ruby-mode")
251 (add-hook 'ruby-mode-hook
257 (load-if-present "haskell-site-file.el")
259 (autoload 'run-haskell "inf-haskell" "" t)
260 (autoload 'switch-to-haskell "inf-haskell" "" t)
261 (autoload 'inferior-haskell-load-file "inf-haskell" "" t)
262 (autoload 'inferior-haskell-type "inf-haskell" "" t)
263 (autoload 'inferior-haskell-info "inf-haskell" "" t)
264 (autoload 'inferior-haskell-find-definition "inf-haskell" "" t)
265 (autoload 'inferior-haskell-find-haddock "inf-haskell" "" t)
268 (add-to-list 'auto-mode-alist '("\\.hs$" . haskell-mode))
269 (add-to-list 'auto-mode-alist '("\\.hsc$" . haskell-mode))
271 (add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
272 (add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
273 (add-hook 'haskell-mode-hook 'turn-on-haskell-ghci)
276 (autoload 'hoogle-lookup "hoogle" "Hoogle" t)
277 (global-set-key (kbd "C-c h") 'hoogle-lookup)
280 (mapcar (lambda (hook)
282 (lambda () (c-set-style "user"))))
289 (autoload 'css-mode "css-mode" "For editing CSS file" t)
290 (setq cssm-indent-level 4)
291 (setq cssm-mirror-mode nil)
292 (setq cssm-indent-function 'cssm-c-style-indenter)
293 (setq auto-mode-alist
295 '(("\\.css$" . css-mode))
299 (autoload 'emacs-wiki-find-file "emacs-wiki" "Emacs Wiki" t)
300 (defalias 'wiki 'emacs-wiki-find-file)
303 (defalias 'perl-mode 'cperl-mode)
304 (setq cperl-indent-level 4)
305 (setq cperl-indent-parens-as-block t)
308 (add-to-list 'load-path "/usr/pkg/lib/erlang/lib/tools-2.6/emacs")
309 (require-if-present 'erlang-start)
310 (setq erlang-electric-commands nil)
313 (require 'skk-autoloads)
314 (global-set-key "\C-x\C-j" 'skk-mode)
315 (global-set-key "\C-xj" 'skk-auto-fill-mode)
316 (global-set-key "\C-xt" 'skk-tutorial)
317 (setq skk-use-jisx0201-input-method t)
318 (setq skk-rom-kana-rule-list
320 ("wi" nil ("ヰ" . "ゐ"))
321 ("we" nil ("ヱ" . "ゑ"))
322 ;;("hh" "h" ("ン" . "ん"))
323 ;;("mm" "m" ("ン" . "ん"))
324 ("zx" nil ("ゝ" . "ヽ"))
325 ("zc" nil ("ゞ" . "ヾ"))))
326 (set-input-method 'japanese-skk) ; INPUT METHOD
329 (autoload 'navi2ch "navi2ch" "Navigator for 2ch for Emacs" t)
332 (require-if-present 'migemo)
335 (setq load-path (cons (expand-file-name "~/sandbox/Tiarra") load-path))
336 (autoload 'tiarra-conf-mode "tiarra-conf" "tiarra.conf editing mode" t)
339 (autoload 'po-mode "po-mode")
340 (setq auto-mode-alist
341 (cons '("\\.po[tx]?\\'\\|\\.po\\." . po-mode)
345 (setq user-full-name "PHO")
346 (setq user-mail-address "pho@cielonegro.org")
350 (add-change-log-entry nil (expand-file-name "~/sync/memo.txt")))
351 (define-key ctl-x-map "M" #'memo)
355 (add-change-log-entry nil (expand-file-name "~/sync/depression.txt")))
356 (define-key ctl-x-map "P" #'depression)
360 (add-change-log-entry nil (expand-file-name "~/sync/plant.txt")))
361 (define-key ctl-x-map "G" #'plant)
364 (add-hook 'calc-start-hook
366 (if (functionp 'paren-deactivate)
367 (paren-deactivate))))
368 (add-hook 'calc-end-hook
370 (if (functionp 'paren-activate)
374 (autoload 'w3m "w3m" "Interface for w3m on Emacs." t)
375 (autoload 'w3m-browse-url "w3m" "Browse url by w3m." t)
376 (autoload 'w3m-find-file "w3m" "w3m interface function for local file." t)
377 (autoload 'w3m-search "w3m-search" "Search QUERY using SEARCH-ENGINE." t)
378 (autoload 'w3m-weather "w3m-weather" "Display weather report." t)
379 (autoload 'w3m-antenna "w3m-antenna" "Report chenge of WEB sites." t)
380 (autoload 'w3m-namazu "w3m-namazu" "Search files with Namazu." t)
383 (autoload 'pov-mode "pov-mode" "POV-Ray scene file mode" t)
384 (setq auto-mode-alist
385 (append '(("\\.pov$" . pov-mode)
386 ("\\.inc$" . pov-mode)
389 ;; End of user configuration ---------------------------------------------------
392 (put 'narrow-to-region 'disabled nil)
393 (custom-set-variables
394 ;; custom-set-variables was added by Custom.
395 ;; If you edit it by hand, you could mess it up, so be careful.
396 ;; Your init file should contain only one such instance.
397 ;; If there is more than one, they won't work right.
398 '(Info-additional-directory-list (quote ("/sw/share/info" "/usr/local/info" "/usr/local/share/info")))
399 '(appt-display-format (quote window))
400 '(appt-message-warning-time 20)
401 '(canlock-password "a14fa4d2601465d55585c291fa8b3943e189e716")
402 '(cleite:auto-refresh-interval nil)
403 '(cleite:measure-srpc-call-time t)
404 '(completion-ignored-extensions (quote (".svn/" "CVS/" ".o" "~" ".bin" ".lbin" ".so" ".a" ".ln" ".blg" ".bbl" ".elc" ".lof" ".glo" ".idx" ".lot" ".dvi" ".fmt" ".tfm" ".pdf" ".class" ".fas" ".lib" ".mem" ".x86f" ".sparcf" ".fasl" ".ufsl" ".fsl" ".dxl" ".pfsl" ".dfsl" ".lo" ".la" ".gmo" ".mo" ".toc" ".aux" ".cp" ".fn" ".ky" ".pg" ".tp" ".vr" ".cps" ".fns" ".kys" ".pgs" ".tps" ".vrs" ".pyc" ".pyo" ".hi")))
405 '(cperl-merge-trailing-else nil)
406 '(default-frame-alist (quote ((tool-bar-lines . 0) (menu-bar-lines . 1) (width . 80) (height . 25) (right-fringe) (left-fringe))))
407 '(ecb-add-path-for-not-matching-files (quote (t)))
408 '(ecb-help-info-path "/sw/share/info/ecb.info")
409 '(ecb-layout-name "left14")
410 '(ecb-options-version "2.32")
411 '(ecb-show-sources-in-directories-buffer (quote always))
412 '(ecb-tip-of-the-day nil)
413 '(ecb-tree-buffer-style (quote ascii-guides))
414 '(ecb-windows-width 0.2)
415 '(elscreen-display-tab t)
416 '(haskell-program-name "ghci")
417 '(ido-enable-flex-matching t)
419 '(ido-ignore-files (quote ("\\`CVS/" "\\`#" "\\`.#" "\\`\\.\\./" "\\`\\./" "\\.ttc")))
420 '(ido-work-directory-list-ignore-regexps (quote ("^\\(/mnt/ibm/\\|/Volumes/IBM80GB/\\)")))
421 '(indent-tabs-mode nil)
422 '(jabber-nickname "PHO")
423 '(jabber-resource "emacs")
424 '(jabber-server "jabber.jp")
425 '(jabber-username "phonohawk")
426 '(jaspace-highlight-tabs t)
427 '(js2-auto-indent-flag nil)
428 '(js2-basic-offset 4)
429 '(js2-indent-on-enter-key nil)
430 '(js2-mirror-mode nil)
431 '(js2-use-font-lock-faces t)
432 '(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))))
433 '(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")))))
434 '(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")))
435 '(mew-spam: "X-Text-Classification:")
436 '(mew-summary-form (quote (type (5 date) " " (14 from) " " t (14 x-classification) " " (30 subj) "|" (0 body))))
437 '(mouse-wheel-progessive-speed nil)
438 '(mouse-wheel-scroll-amount (quote (1 ((shift) . 5) ((control)))))
439 '(navi2ch-browse-url-browser-function (quote browse-url-firefox))
440 '(navi2ch-display-splash-screen nil)
441 '(navi2ch-list-moved-board-alist (quote (("http://mamono.2ch.net/ihou/" . "http://hideyoshi.2ch.net/ihou/"))))
442 '(navi2ch-mona-face-variable (quote navi2ch-mona12-face))
443 '(navi2ch-mona-on-message-mode t)
444 '(newsticker-html-renderer (quote w3m-region))
445 '(newsticker-url-list nil)
446 '(newsticker-url-list-defaults (quote (("slashdot" "http://slashdot.org/index.rss" nil 3600))))
447 '(nxml-auto-insert-xml-declaration-flag t)
448 '(nxml-slash-auto-complete-flag t)
449 '(riece-layout "default")
450 '(riece-layout-alist (quote (("middle-right" riece-configure-windows right middle) ("middle-left" riece-configure-windows left middle) ("top-right" riece-configure-windows right top) ("top-left" riece-configure-windows left top) ("bottom-right" riece-configure-windows right bottom) ("bottom-left" riece-configure-windows left bottom) ("top" riece-configure-windows-top) ("spiral" riece-configure-windows-spiral) ("default" . "middle-right"))))
451 '(riece-others-buffer-mode nil)
452 '(rng-schema-locating-files (quote ("schemas.xml" "/sw/share/schema/schemas.xml" "~/share/nxml/schemas.xml")))
453 '(rst-level-face-base-light 50)
454 '(safe-local-variable-values (quote ((todo-categories "Todo" "Todo" "Todo" "Todo"))))
455 '(tramp-auto-save-directory "/tmp/tramp-auto-save")
456 '(tramp-completion-reread-directory-timeout 2)
457 '(tramp-default-host "localhost")
458 '(w3m-bookmark-file-coding-system (quote utf-8))
459 '(w3m-coding-system (quote utf-8))
460 '(w3m-coding-system-priority-list (quote (utf-8)))
461 '(w3m-default-coding-system (quote utf-8))
462 '(w3m-default-display-inline-images t)
463 '(w3m-file-coding-system (quote utf-8))
464 '(w3m-file-name-coding-system (quote utf-8))
465 '(w3m-fill-column 80)
466 '(w3m-input-coding-system (quote utf-8))
467 '(w3m-key-binding nil)
468 '(w3m-output-coding-system (quote utf-8))
469 '(w3m-terminal-coding-system (quote utf-8))
471 '(x-select-enable-clipboard t))
473 ;; custom-set-faces was added by Custom.
474 ;; If you edit it by hand, you could mess it up, so be careful.
475 ;; Your init file should contain only one such instance.
476 ;; If there is more than one, they won't work right.
477 '(flyspell-incorrect ((t (:foreground "OrangeRed" :overline t))))
478 '(jaspace-highlight-tab-face ((((class color) (background dark)) (:foreground "gray70" :underline t))))
479 '(which-func-face ((t (:background "black" :foreground "dark orange")))))