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 ;; Hooks for newline-and-indent ------------------------------------------------
47 (mapcar (lambda (hook)
50 (local-set-key "\C-m" 'newline-and-indent)
51 (local-set-key "\C-j" 'newline)
66 ;; Setting for Packages --------------------------------------------------------
67 (defun require-if-present (feature)
71 (if (equal (cadr e) "Cannot open load file")
72 (message "Warning: feature %s is absent" feature) ; warn and ignore
73 (apply 'signal (car e) (cdr e)))))) ; rethrow
75 (defun load-if-present (file)
79 (if (equal (cadr e) "Cannot open load file")
80 (message "Warning: file named %s is absent" file) ; warn and ignore
81 (apply 'signal (car e) (cdr e)))))) ; rethrow
83 (defun load-file-if-present (path)
84 (if (file-exists-p path)
86 (message "Warning: file %s is absent" path)))
89 (require-if-present 'flyspell)
92 (require-if-present 'jaspace)
95 (require-if-present 'mic-paren)
96 (if (featurep 'mic-paren)
100 (load "elscreen" "ElScreen" t)
101 (require-if-present 'elscreen-w3m)
104 ;(require-if-present 'mpc-autoloads)
107 (autoload 'rst-mode "rst"
108 "mode for editing reStructuredText documents" t)
109 (setq auto-mode-alist
110 (append '(("\\.rst$" . rst-mode)
111 ("\\.rest$" . rst-mode)) auto-mode-alist))
114 (require-if-present 'twittering-mode)
115 (setq twittering-username "phonohawk")
118 (load-file-if-present "/usr/pkg/share/emacs/site-lisp/cedet/common/cedet.el")
121 (autoload 'riece "riece" "Start Riece" t)
122 (add-hook 'riece-after-load-startup-hook
124 (add-to-list 'riece-addons 'riece-alias)
125 (add-to-list 'riece-addons 'riece-skk-kakutei)
126 (add-to-list 'riece-addons 'riece-keyword)
127 (add-to-list 'riece-addons 'riece-ctlseq)))
130 (require-if-present 'ecb-autoloads)
131 (let* ((hosts '(("netbsd." .
132 (("~/sandbox/yxmimeproc" "yxmimeproc")
133 ("~/sandbox/YxMIME" "YxMIME.pm")
136 (("~/sandbox/MR/engine/libycom" "libycom")
138 ("aria.cielonegro.org" .
139 (("~/sandbox/_web-app/Rakka" "Rakka")
140 ("~/sandbox/_haskell/Lucu" "Lucu")
141 ("~/sandbox/_web-app/Kirschbaum" "Kirschbaum")
142 ("~/sandbox/_haskell/HsOpenSSL" "HsOpenSSL")
143 ("~/sandbox/_haskell/HsHyperEstraier" "HsHyperEstraier")
144 ("~/sandbox/_haskell/HsSVN" "HsSVN")
145 ("~/sandbox/_game/RoRo" "RoRo")
146 ("~/sandbox/_haskell/HXT" "HXT")
147 ("~/sandbox/_haskell/hxt-compile" "hxt-compile")
148 ("~/src/ghc-6.10.1" "ghc-6.10.1")
149 ("~/sandbox/sugar" "sugar")
150 ("~/sandbox/_haskell/dns" "dns")
151 ("~/sandbox/_haskell/blackboard-ddns" "blackboard-ddns")
153 (paths (cdr (assoc (system-name) hosts))))
154 (setq ecb-source-path paths))
157 (require-if-present 'gaelic)
160 (autoload 'rnc-mode "rnc-mode")
161 (add-to-list 'auto-mode-alist '("\\.rnc\\'" . rnc-mode))
164 (setq bookmark-sort-flag nil)
167 (autoload 'sudoku "sudoku" "The Sudoku" t)
170 (autoload 'mew "mew" "Mew" t)
173 (autoload 'cleite "cleite" "Cleite RSS Aggregator -- Emacs Interface" t)
176 (autoload 'js2-mode "js2" nil t)
177 (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
184 (autoload 'sokoban "sokoban.el" "Start a new game of Sokoban." t)
185 (autoload 'sokoban-mode "sokoban.el" "Play Sokoban in current buffer." t)
186 (setq sokoban-playerfiles-dir "/usr/local/var/games/emacs-sokoban")
189 (load-file-if-present "/usr/pkg/share/emacs/site-lisp/nxml-mode/rng-auto.el")
190 (defalias 'xml-mode 'nxml-mode)
191 (add-to-list 'auto-mode-alist '("\\.xml$" . nxml-mode))
192 (add-to-list 'auto-mode-alist '("\\.xi$" . nxml-mode))
193 (add-to-list 'auto-mode-alist '("\\.rdf$" . nxml-mode))
194 (add-to-list 'auto-mode-alist '("\\.rng$" . nxml-mode))
197 (autoload 'sstp-mode "sstp" "SSTP Editing Major-Mode" t)
200 (autoload 'ruby-mode "ruby-mode" "Mode for editing ruby source files")
201 (setq auto-mode-alist
202 (append '(("\\.rb$" . ruby-mode)) auto-mode-alist))
203 (setq interpreter-mode-alist (append '(("ruby" .ruby-mode))
204 interpreter-mode-alist))
205 (autoload 'run-ruby "inf-ruby" "Run an inferior Ruby process")
206 (autoload 'inf-ruby-keys "inf-ruby" "set local key defs for inf-ruby in ruby-mode")
207 (add-hook 'ruby-mode-hook
213 (setq tramp-default-method "ssh")
216 (load-if-present "haskell-site-file.el")
218 (autoload 'run-haskell "inf-haskell" "" t)
219 (autoload 'switch-to-haskell "inf-haskell" "" t)
220 (autoload 'inferior-haskell-load-file "inf-haskell" "" t)
221 (autoload 'inferior-haskell-type "inf-haskell" "" t)
222 (autoload 'inferior-haskell-info "inf-haskell" "" t)
223 (autoload 'inferior-haskell-find-definition "inf-haskell" "" t)
224 (autoload 'inferior-haskell-find-haddock "inf-haskell" "" t)
227 (add-to-list 'auto-mode-alist '("\\.hs$" . haskell-mode))
228 (add-to-list 'auto-mode-alist '("\\.hsc$" . haskell-mode))
230 (add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
231 (add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
232 (add-hook 'haskell-mode-hook 'turn-on-haskell-ghci)
235 (autoload 'hoogle-lookup "hoogle" "Hoogle" t)
236 (global-set-key (kbd "C-c h") 'hoogle-lookup)
239 (mapcar (lambda (hook)
241 (lambda () (c-set-style "user"))))
248 (autoload 'css-mode "css-mode" "For editing CSS file" t)
249 (setq cssm-indent-level 4)
250 (setq cssm-mirror-mode nil)
251 (setq cssm-indent-function 'cssm-c-style-indenter)
252 (setq auto-mode-alist
254 '(("\\.css$" . css-mode))
258 (autoload 'emacs-wiki-find-file "emacs-wiki" "Emacs Wiki" t)
259 (defalias 'wiki 'emacs-wiki-find-file)
262 (defalias 'perl-mode 'cperl-mode)
263 (setq cperl-indent-level 4)
264 (setq cperl-indent-parens-as-block t)
267 (require 'skk-autoloads)
268 (global-set-key "\C-x\C-j" 'skk-mode)
269 (global-set-key "\C-xj" 'skk-auto-fill-mode)
270 (global-set-key "\C-xt" 'skk-tutorial)
271 (setq skk-use-jisx0201-input-method t)
272 (setq skk-rom-kana-rule-list
274 ("wi" nil ("ヰ" . "ゐ"))
275 ("we" nil ("ヱ" . "ゑ"))
276 ;;("hh" "h" ("ン" . "ん"))
277 ;;("mm" "m" ("ン" . "ん"))
278 ("zx" nil ("ゝ" . "ヽ"))
279 ("zc" nil ("ゞ" . "ヾ"))))
280 (set-input-method 'japanese-skk) ; INPUT METHOD
283 (autoload 'navi2ch "navi2ch" "Navigator for 2ch for Emacs" t)
286 (require-if-present 'migemo)
289 (setq load-path (cons (expand-file-name "~/sandbox/Tiarra") load-path))
290 (autoload 'tiarra-conf-mode "tiarra-conf" "tiarra.conf editing mode" t)
293 (autoload 'po-mode "po-mode")
294 (setq auto-mode-alist
295 (cons '("\\.po[tx]?\\'\\|\\.po\\." . po-mode)
299 (setq user-full-name "PHO")
300 (setq user-mail-address "pho@cielonegro.org")
304 (add-change-log-entry nil (expand-file-name "~/sync/memo.txt")))
305 (define-key ctl-x-map "M" #'memo)
309 (add-change-log-entry nil (expand-file-name "~/sync/depression.txt")))
310 (define-key ctl-x-map "P" #'depression)
314 (add-change-log-entry nil (expand-file-name "~/sync/plant.txt")))
315 (define-key ctl-x-map "G" #'plant)
318 (add-hook 'calc-start-hook
320 (if (functionp 'paren-deactivate)
321 (paren-deactivate))))
322 (add-hook 'calc-end-hook
324 (if (functionp 'paren-activate)
328 (autoload 'w3m "w3m" "Interface for w3m on Emacs." t)
329 (autoload 'w3m-browse-url "w3m" "Browse url by w3m." t)
330 (autoload 'w3m-find-file "w3m" "w3m interface function for local file." t)
331 (autoload 'w3m-search "w3m-search" "Search QUERY using SEARCH-ENGINE." t)
332 (autoload 'w3m-weather "w3m-weather" "Display weather report." t)
333 (autoload 'w3m-antenna "w3m-antenna" "Report chenge of WEB sites." t)
334 (autoload 'w3m-namazu "w3m-namazu" "Search files with Namazu." t)
337 (autoload 'pov-mode "pov-mode" "POV-Ray scene file mode" t)
338 (setq auto-mode-alist
339 (append '(("\\.pov$" . pov-mode)
340 ("\\.inc$" . pov-mode)
343 ;; End of user configuration ---------------------------------------------------
346 (put 'narrow-to-region 'disabled nil)
347 (custom-set-variables
348 ;; custom-set-variables was added by Custom.
349 ;; If you edit it by hand, you could mess it up, so be careful.
350 ;; Your init file should contain only one such instance.
351 ;; If there is more than one, they won't work right.
352 '(Info-additional-directory-list (quote ("/sw/share/info" "/usr/local/info" "/usr/local/share/info")))
353 '(appt-display-format (quote window))
354 '(appt-message-warning-time 20)
355 '(canlock-password "a14fa4d2601465d55585c291fa8b3943e189e716")
356 '(cleite:auto-refresh-interval nil)
357 '(cleite:measure-srpc-call-time t)
358 '(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")))
359 '(cperl-merge-trailing-else nil)
360 '(default-frame-alist (quote ((tool-bar-lines . 0) (menu-bar-lines . 1) (width . 80) (height . 25) (right-fringe) (left-fringe))))
361 '(ecb-add-path-for-not-matching-files (quote (t)))
362 '(ecb-help-info-path "/sw/share/info/ecb.info")
363 '(ecb-layout-name "left14")
364 '(ecb-options-version "2.32")
365 '(ecb-show-sources-in-directories-buffer (quote always))
366 '(ecb-tip-of-the-day nil)
367 '(ecb-tree-buffer-style (quote ascii-guides))
368 '(ecb-windows-width 0.2)
369 '(elscreen-display-tab t)
370 '(haskell-program-name "ghci")
371 '(ido-enable-flex-matching t)
373 '(ido-ignore-files (quote ("\\`CVS/" "\\`#" "\\`.#" "\\`\\.\\./" "\\`\\./" "\\.ttc")))
374 '(ido-work-directory-list-ignore-regexps (quote ("^\\(/mnt/ibm/\\|/Volumes/IBM80GB/\\)")))
375 '(indent-tabs-mode nil)
376 '(jabber-nickname "PHO")
377 '(jabber-resource "emacs")
378 '(jabber-server "jabber.jp")
379 '(jabber-username "phonohawk")
380 '(jaspace-highlight-tabs t)
381 '(js2-basic-offset 4)
382 '(js2-indent-on-enter-key t)
383 '(js2-use-font-lock-faces t)
384 '(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))))
385 '(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")))))
386 '(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")))
387 '(mew-spam: "X-Text-Classification:")
388 '(mew-summary-form (quote (type (5 date) " " (14 from) " " t (14 x-classification) " " (30 subj) "|" (0 body))))
389 '(mouse-wheel-progessive-speed nil)
390 '(mouse-wheel-scroll-amount (quote (1 ((shift) . 5) ((control)))))
391 '(navi2ch-browse-url-browser-function (quote browse-url-firefox))
392 '(navi2ch-display-splash-screen nil)
393 '(navi2ch-list-moved-board-alist (quote (("http://mamono.2ch.net/ihou/" . "http://hideyoshi.2ch.net/ihou/"))))
394 '(navi2ch-mona-face-variable (quote navi2ch-mona16-face))
395 '(navi2ch-mona-on-message-mode t)
396 '(newsticker-html-renderer (quote w3m-region))
397 '(newsticker-url-list nil)
398 '(newsticker-url-list-defaults (quote (("slashdot" "http://slashdot.org/index.rss" nil 3600))))
399 '(nxml-auto-insert-xml-declaration-flag t)
400 '(nxml-slash-auto-complete-flag t)
401 '(riece-layout "default")
402 '(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"))))
403 '(riece-others-buffer-mode nil)
404 '(rng-schema-locating-files (quote ("schemas.xml" "/sw/share/schema/schemas.xml" "~/share/nxml/schemas.xml")))
405 '(safe-local-variable-values (quote ((todo-categories "Todo" "Todo" "Todo" "Todo"))))
406 '(w3m-bookmark-file-coding-system (quote utf-8))
407 '(w3m-coding-system (quote utf-8))
408 '(w3m-coding-system-priority-list (quote (utf-8)))
409 '(w3m-default-coding-system (quote utf-8))
410 '(w3m-default-display-inline-images t)
411 '(w3m-file-coding-system (quote utf-8))
412 '(w3m-file-name-coding-system (quote utf-8))
413 '(w3m-fill-column 80)
414 '(w3m-input-coding-system (quote utf-8))
415 '(w3m-key-binding nil)
416 '(w3m-output-coding-system (quote utf-8))
417 '(w3m-terminal-coding-system (quote utf-8))
419 '(x-select-enable-clipboard t))
421 ;; custom-set-faces was added by Custom.
422 ;; If you edit it by hand, you could mess it up, so be careful.
423 ;; Your init file should contain only one such instance.
424 ;; If there is more than one, they won't work right.
425 '(flyspell-incorrect ((t (:foreground "OrangeRed" :overline t))))
426 '(jaspace-highlight-tab-face ((((class color) (background dark)) (:foreground "gray70" :underline t))))
427 '(which-func-face ((t (:background "black" :foreground "dark orange")))))