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)
35 ;; Settings for Browser --------------------------------------------------------
36 (setq browse-url-browser-function 'w3m-browse-url)
37 (global-set-key "\C-xm" 'browse-url-at-point)
39 ;; Setting for the Mode Line ---------------------------------------------------
41 (column-number-mode t)
44 ;; Setting for Frames ----------------------------------------------------------
46 (set-default-font "Bitstream Vera Sans Mono 11")
47 (set-fontset-font (frame-parameter nil 'font)
49 '("Hiragino Kaku Gothic Pro W3" . "unicode-bmp")))
51 ;; Hooks for newline-and-indent ------------------------------------------------
52 (mapcar (lambda (hook)
55 (local-set-key "\C-m" 'newline-and-indent)
56 (local-set-key "\C-j" 'newline)
71 ;; Setting for Packages --------------------------------------------------------
72 (defun require-if-present (feature)
76 (if (equal (cadr e) "Cannot open load file")
77 (message "Warning: feature %s is absent" feature) ; warn and ignore
78 (apply 'signal (car e) (cdr e)))))) ; rethrow
80 (defun load-if-present (file)
84 (if (equal (cadr e) "Cannot open load file")
85 (message "Warning: file named %s is absent" file) ; warn and ignore
86 (apply 'signal (car e) (cdr e)))))) ; rethrow
88 (defun load-file-if-present (path)
89 (if (file-exists-p path)
91 (message "Warning: file %s is absent" path)))
94 (require-if-present 'flyspell)
97 (require-if-present 'jaspace)
100 (require-if-present 'mic-paren)
101 (if (featurep 'mic-paren)
105 (load "elscreen" "ElScreen" t)
106 (require-if-present 'elscreen-w3m)
109 ;(require-if-present 'mpc-autoloads)
112 (autoload 'rst-mode "rst"
113 "mode for editing reStructuredText documents" t)
114 (setq auto-mode-alist
115 (append '(("\\.rst$" . rst-mode)
116 ("\\.rest$" . rst-mode)) auto-mode-alist))
119 (require-if-present 'twittering-mode)
120 (setq twittering-username "phonohawk")
123 (load-file-if-present "/usr/pkg/share/emacs/site-lisp/cedet/common/cedet.el")
126 (autoload 'riece "riece" "Start Riece" t)
127 (add-hook 'riece-after-load-startup-hook
129 (add-to-list 'riece-addons 'riece-alias)
130 (add-to-list 'riece-addons 'riece-skk-kakutei)
131 (add-to-list 'riece-addons 'riece-keyword)
132 (add-to-list 'riece-addons 'riece-ctlseq)))
135 (require-if-present 'ecb-autoloads)
136 (let* ((hosts '(("netbsd." .
137 (("~/sandbox/yxmimeproc" "yxmimeproc")
138 ("~/sandbox/YxMIME" "YxMIME.pm")
141 (("~/sandbox/MR/engine/libycom" "libycom")
143 ("aria.cielonegro.org" .
144 (("~/sandbox/_web-app/Rakka" "Rakka")
145 ("~/sandbox/_haskell/Lucu" "Lucu")
146 ("~/sandbox/_web-app/Kirschbaum" "Kirschbaum")
147 ("~/sandbox/_haskell/HsOpenSSL" "HsOpenSSL")
148 ("~/sandbox/_haskell/HsHyperEstraier" "HsHyperEstraier")
149 ("~/sandbox/_haskell/HsSVN" "HsSVN")
150 ("~/sandbox/_game/RoRo" "RoRo")
151 ("~/sandbox/_haskell/HXT" "HXT")
152 ("~/sandbox/_haskell/hxt-compile" "hxt-compile")
153 ("~/src/ghc-6.10.1" "ghc-6.10.1")
154 ("~/sandbox/sugar" "sugar")
155 ("~/sandbox/_haskell/dns" "dns")
156 ("~/sandbox/_haskell/blackboard-ddns" "blackboard-ddns")
158 (paths (cdr (assoc (system-name) hosts))))
159 (setq ecb-source-path paths))
162 (require-if-present 'gaelic)
165 (autoload 'rnc-mode "rnc-mode")
166 (add-to-list 'auto-mode-alist '("\\.rnc\\'" . rnc-mode))
169 (setq bookmark-sort-flag nil)
172 (autoload 'sudoku "sudoku" "The Sudoku" t)
175 (autoload 'mew "mew" "Mew" t)
178 (autoload 'cleite "cleite" "Cleite RSS Aggregator -- Emacs Interface" t)
181 (autoload 'js2-mode "js2" nil t)
182 (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
189 (autoload 'sokoban "sokoban.el" "Start a new game of Sokoban." t)
190 (autoload 'sokoban-mode "sokoban.el" "Play Sokoban in current buffer." t)
191 (setq sokoban-playerfiles-dir "/usr/local/var/games/emacs-sokoban")
194 (load-file-if-present "/usr/pkg/share/emacs/site-lisp/nxml-mode/rng-auto.el")
195 (defalias 'xml-mode 'nxml-mode)
196 (add-to-list 'auto-mode-alist '("\\.xml$" . nxml-mode))
197 (add-to-list 'auto-mode-alist '("\\.xi$" . nxml-mode))
198 (add-to-list 'auto-mode-alist '("\\.rdf$" . nxml-mode))
199 (add-to-list 'auto-mode-alist '("\\.rng$" . nxml-mode))
202 (autoload 'sstp-mode "sstp" "SSTP Editing Major-Mode" t)
205 (autoload 'ruby-mode "ruby-mode" "Mode for editing ruby source files")
206 (setq auto-mode-alist
207 (append '(("\\.rb$" . ruby-mode)) auto-mode-alist))
208 (setq interpreter-mode-alist (append '(("ruby" .ruby-mode))
209 interpreter-mode-alist))
210 (autoload 'run-ruby "inf-ruby" "Run an inferior Ruby process")
211 (autoload 'inf-ruby-keys "inf-ruby" "set local key defs for inf-ruby in ruby-mode")
212 (add-hook 'ruby-mode-hook
218 (setq tramp-default-method "ssh")
221 (load-if-present "haskell-site-file.el")
223 (autoload 'run-haskell "inf-haskell" "" t)
224 (autoload 'switch-to-haskell "inf-haskell" "" t)
225 (autoload 'inferior-haskell-load-file "inf-haskell" "" t)
226 (autoload 'inferior-haskell-type "inf-haskell" "" t)
227 (autoload 'inferior-haskell-info "inf-haskell" "" t)
228 (autoload 'inferior-haskell-find-definition "inf-haskell" "" t)
229 (autoload 'inferior-haskell-find-haddock "inf-haskell" "" t)
232 (add-to-list 'auto-mode-alist '("\\.hs$" . haskell-mode))
233 (add-to-list 'auto-mode-alist '("\\.hsc$" . haskell-mode))
235 (add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
236 (add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
237 (add-hook 'haskell-mode-hook 'turn-on-haskell-ghci)
240 (autoload 'hoogle-lookup "hoogle" "Hoogle" t)
241 (global-set-key (kbd "C-c h") 'hoogle-lookup)
244 (mapcar (lambda (hook)
246 (lambda () (c-set-style "user"))))
253 (autoload 'css-mode "css-mode" "For editing CSS file" t)
254 (setq cssm-indent-level 4)
255 (setq cssm-mirror-mode nil)
256 (setq cssm-indent-function 'cssm-c-style-indenter)
257 (setq auto-mode-alist
259 '(("\\.css$" . css-mode))
263 (autoload 'emacs-wiki-find-file "emacs-wiki" "Emacs Wiki" t)
264 (defalias 'wiki 'emacs-wiki-find-file)
267 (defalias 'perl-mode 'cperl-mode)
268 (setq cperl-indent-level 4)
269 (setq cperl-indent-parens-as-block t)
272 (add-to-list 'load-path "/usr/pkg/lib/erlang/lib/tools-2.6/emacs")
273 (require-if-present 'erlang-start)
276 (require 'skk-autoloads)
277 (global-set-key "\C-x\C-j" 'skk-mode)
278 (global-set-key "\C-xj" 'skk-auto-fill-mode)
279 (global-set-key "\C-xt" 'skk-tutorial)
280 (setq skk-use-jisx0201-input-method t)
281 (setq skk-rom-kana-rule-list
283 ("wi" nil ("ヰ" . "ゐ"))
284 ("we" nil ("ヱ" . "ゑ"))
285 ;;("hh" "h" ("ン" . "ん"))
286 ;;("mm" "m" ("ン" . "ん"))
287 ("zx" nil ("ゝ" . "ヽ"))
288 ("zc" nil ("ゞ" . "ヾ"))))
289 (set-input-method 'japanese-skk) ; INPUT METHOD
292 (autoload 'navi2ch "navi2ch" "Navigator for 2ch for Emacs" t)
295 (require-if-present 'migemo)
298 (setq load-path (cons (expand-file-name "~/sandbox/Tiarra") load-path))
299 (autoload 'tiarra-conf-mode "tiarra-conf" "tiarra.conf editing mode" t)
302 (autoload 'po-mode "po-mode")
303 (setq auto-mode-alist
304 (cons '("\\.po[tx]?\\'\\|\\.po\\." . po-mode)
308 (setq user-full-name "PHO")
309 (setq user-mail-address "pho@cielonegro.org")
313 (add-change-log-entry nil (expand-file-name "~/sync/memo.txt")))
314 (define-key ctl-x-map "M" #'memo)
318 (add-change-log-entry nil (expand-file-name "~/sync/depression.txt")))
319 (define-key ctl-x-map "P" #'depression)
323 (add-change-log-entry nil (expand-file-name "~/sync/plant.txt")))
324 (define-key ctl-x-map "G" #'plant)
327 (add-hook 'calc-start-hook
329 (if (functionp 'paren-deactivate)
330 (paren-deactivate))))
331 (add-hook 'calc-end-hook
333 (if (functionp 'paren-activate)
337 (autoload 'w3m "w3m" "Interface for w3m on Emacs." t)
338 (autoload 'w3m-browse-url "w3m" "Browse url by w3m." t)
339 (autoload 'w3m-find-file "w3m" "w3m interface function for local file." t)
340 (autoload 'w3m-search "w3m-search" "Search QUERY using SEARCH-ENGINE." t)
341 (autoload 'w3m-weather "w3m-weather" "Display weather report." t)
342 (autoload 'w3m-antenna "w3m-antenna" "Report chenge of WEB sites." t)
343 (autoload 'w3m-namazu "w3m-namazu" "Search files with Namazu." t)
346 (autoload 'pov-mode "pov-mode" "POV-Ray scene file mode" t)
347 (setq auto-mode-alist
348 (append '(("\\.pov$" . pov-mode)
349 ("\\.inc$" . pov-mode)
352 ;; End of user configuration ---------------------------------------------------
355 (put 'narrow-to-region 'disabled nil)
356 (custom-set-variables
357 ;; custom-set-variables was added by Custom.
358 ;; If you edit it by hand, you could mess it up, so be careful.
359 ;; Your init file should contain only one such instance.
360 ;; If there is more than one, they won't work right.
361 '(Info-additional-directory-list (quote ("/sw/share/info" "/usr/local/info" "/usr/local/share/info")))
362 '(appt-display-format (quote window))
363 '(appt-message-warning-time 20)
364 '(canlock-password "a14fa4d2601465d55585c291fa8b3943e189e716")
365 '(cleite:auto-refresh-interval nil)
366 '(cleite:measure-srpc-call-time t)
367 '(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")))
368 '(cperl-merge-trailing-else nil)
369 '(default-frame-alist (quote ((tool-bar-lines . 0) (menu-bar-lines . 1) (width . 80) (height . 25) (right-fringe) (left-fringe))))
370 '(ecb-add-path-for-not-matching-files (quote (t)))
371 '(ecb-help-info-path "/sw/share/info/ecb.info")
372 '(ecb-layout-name "left14")
373 '(ecb-options-version "2.32")
374 '(ecb-show-sources-in-directories-buffer (quote always))
375 '(ecb-tip-of-the-day nil)
376 '(ecb-tree-buffer-style (quote ascii-guides))
377 '(ecb-windows-width 0.2)
378 '(elscreen-display-tab t)
379 '(haskell-program-name "ghci")
380 '(ido-enable-flex-matching t)
382 '(ido-ignore-files (quote ("\\`CVS/" "\\`#" "\\`.#" "\\`\\.\\./" "\\`\\./" "\\.ttc")))
383 '(ido-work-directory-list-ignore-regexps (quote ("^\\(/mnt/ibm/\\|/Volumes/IBM80GB/\\)")))
384 '(indent-tabs-mode nil)
385 '(jabber-nickname "PHO")
386 '(jabber-resource "emacs")
387 '(jabber-server "jabber.jp")
388 '(jabber-username "phonohawk")
389 '(jaspace-highlight-tabs t)
390 '(js2-basic-offset 4)
391 '(js2-indent-on-enter-key t)
392 '(js2-use-font-lock-faces t)
393 '(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))))
394 '(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")))))
395 '(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")))
396 '(mew-spam: "X-Text-Classification:")
397 '(mew-summary-form (quote (type (5 date) " " (14 from) " " t (14 x-classification) " " (30 subj) "|" (0 body))))
398 '(mouse-wheel-progessive-speed nil)
399 '(mouse-wheel-scroll-amount (quote (1 ((shift) . 5) ((control)))))
400 '(navi2ch-browse-url-browser-function (quote browse-url-firefox))
401 '(navi2ch-display-splash-screen nil)
402 '(navi2ch-list-moved-board-alist (quote (("http://mamono.2ch.net/ihou/" . "http://hideyoshi.2ch.net/ihou/"))))
403 '(navi2ch-mona-face-variable (quote navi2ch-mona16-face))
404 '(navi2ch-mona-on-message-mode t)
405 '(newsticker-html-renderer (quote w3m-region))
406 '(newsticker-url-list nil)
407 '(newsticker-url-list-defaults (quote (("slashdot" "http://slashdot.org/index.rss" nil 3600))))
408 '(nxml-auto-insert-xml-declaration-flag t)
409 '(nxml-slash-auto-complete-flag t)
410 '(riece-layout "default")
411 '(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"))))
412 '(riece-others-buffer-mode nil)
413 '(rng-schema-locating-files (quote ("schemas.xml" "/sw/share/schema/schemas.xml" "~/share/nxml/schemas.xml")))
414 '(safe-local-variable-values (quote ((todo-categories "Todo" "Todo" "Todo" "Todo"))))
415 '(w3m-bookmark-file-coding-system (quote utf-8))
416 '(w3m-coding-system (quote utf-8))
417 '(w3m-coding-system-priority-list (quote (utf-8)))
418 '(w3m-default-coding-system (quote utf-8))
419 '(w3m-default-display-inline-images t)
420 '(w3m-file-coding-system (quote utf-8))
421 '(w3m-file-name-coding-system (quote utf-8))
422 '(w3m-fill-column 80)
423 '(w3m-input-coding-system (quote utf-8))
424 '(w3m-key-binding nil)
425 '(w3m-output-coding-system (quote utf-8))
426 '(w3m-terminal-coding-system (quote utf-8))
428 '(x-select-enable-clipboard t))
430 ;; custom-set-faces was added by Custom.
431 ;; If you edit it by hand, you could mess it up, so be careful.
432 ;; Your init file should contain only one such instance.
433 ;; If there is more than one, they won't work right.
434 '(flyspell-incorrect ((t (:foreground "OrangeRed" :overline t))))
435 '(jaspace-highlight-tab-face ((((class color) (background dark)) (:foreground "gray70" :underline t))))
436 '(which-func-face ((t (:background "black" :foreground "dark orange")))))