-;; -*- Coding: utf-8 -*-
+;; -*- Mode: emacs-lisp; Coding: utf-8 -*-
-;;General
+;; Load paths -----------------------------------------------------------------
(add-to-list 'load-path (expand-file-name "~/.elisp"))
(add-to-list 'load-path "/usr/local/share/emacs/site-lisp")
-(add-to-list 'load-path "/usr/local/share/emacs/site-lisp/quail-gaelic")
-;; fink -> pkgsrc
-(add-to-list 'load-path "/sw/share/emacs/site-lisp")
-(add-to-list 'load-path "/sw/share/emacs/site-lisp/elcleite")
-
-;; Setting for encodings of the environment
+;; Setting for encodings of the environment -----------------------------------
(set-language-environment 'Japanese)
(set-default-coding-systems 'utf-8)
(set-terminal-coding-system 'utf-8)
(setq default-file-name-coding-system 'utf-8)
-(set-keyboard-coding-system 'shift_jis-mac)
-(quail-set-keyboard-layout "jp106")
-
+(set-keyboard-coding-system 'utf-8)
(set-clipboard-coding-system 'utf-8)
-;(set-clipboard-coding-system 'iso-2022-jp-mac)
-;(set-clipboard-coding-system 'shift_jis-mac)
+;; Settings for the Emacs itself ----------------------------------------------
(setq truncate-partial-width-windows t)
(setq make-backup-files nil)
(unless window-system
(normal-erase-is-backspace-mode t))
-;; browse-url
-(setq browse-url-browser-function 'w3m-browse-url)
-(global-set-key "\C-xm" 'browse-url-at-point)
-
(setq-default tab-width 4)
(global-font-lock-mode t)
-
-;; font ------------------------------------------------------------------------
-(if nil
- (progn (create-fontset-from-fontset-spec
- (concat
- "-*-sindarin-medium-r-normal-*-12-*-*-*-*-*-fontset-sindarin12,"
- "ascii:-misc-Tengwar Sindarin-medium-r-normal-*-12-*-*-*-*-*-iso10646-1"))
- (create-fontset-from-fontset-spec
- (concat
- "-*-sindarin-medium-r-normal-*-14-*-*-*-*-*-fontset-sindarin14,"
- "ascii:-misc-Tengwar Sindarin-medium-r-normal-*-14-*-*-*-*-*-iso10646-1"))
- (create-fontset-from-fontset-spec
- (concat
- "-*-sindarin-medium-r-normal-*-16-*-*-*-*-*-fontset-sindarin16,"
- "ascii:-misc-Tengwar Sindarin-medium-r-normal-*-16-*-*-*-*-*-iso10646-1"))))
-
-
-;; Setting for the Mode Line ---------------------------------------------------
-(line-number-mode t)
-(column-number-mode t)
-
(auto-compression-mode t)
(setq visible-bell t)
(setq ring-bell-function (lambda ()))
(windmove-default-keybindings)
+;; Settings for Browser --------------------------------------------------------
+(setq browse-url-browser-function 'w3m-browse-url)
+(global-set-key "\C-xm" 'browse-url-at-point)
+
+;; Setting for the Mode Line ---------------------------------------------------
+(line-number-mode t)
+(column-number-mode t)
+(display-time)
;; Setting for Frames ----------------------------------------------------------
-;(setq default-frame-alist (append default-frame-alist '((cursor-type . hbar)))
+;; Hooks for newline-and-indent ------------------------------------------------
+(mapcar (lambda (hook)
+ (add-hook hook
+ (lambda ()
+ (local-set-key "\C-m" 'newline-and-indent)
+ (local-set-key "\C-j" 'newline)
+ )))
+ '(perl-mode-hook
+ cperl-mode-hook
+ java-mode-hook
+ javascript-mode-hook
+ c-mode-hook
+ c++-mode-hook
+ objc-mode-hook
+ emacs-lisp-mode-hook
+ lisp-mode-hook
+ yatex-mode-hook
+ css-mode-hook
+ scheme-mode-hook))
;; Setting for Packages --------------------------------------------------------
-
-;; fucking-comma
-;(require 'call-the-fucking-comma)
+(defun require-if-present (feature)
+ (condition-case e
+ (require feature)
+ (file-error
+ (if (equal (cadr e) "Cannot open load file")
+ (message "Warning: feature %s is absent" feature) ; warn and ignore
+ (apply 'signal (car e) (cdr e)))))) ; rethrow
+
+(defun load-file-if-present (path)
+ (if (file-exists-p path)
+ (load-file path)
+ (message "Warning: file %s is absent" path)))
;; flyspell
-(require 'flyspell)
+(require-if-present 'flyspell)
;; mic-paren
-(require 'mic-paren)
-(paren-activate)
+(require-if-present 'mic-paren)
+(if (featurep 'mic-paren)
+ (paren-activate))
;; elscreen
(load "elscreen" "ElScreen" t)
-(require 'elscreen-w3m)
+(require-if-present 'elscreen-w3m)
;; MPC
-;(require 'mpc-autoloads)
+;(require-if-present 'mpc-autoloads)
;; cedet
-(load-file "/usr/pkg/share/emacs/site-lisp/cedet/common/cedet.el")
+(load-file-if-present "/usr/pkg/share/emacs/site-lisp/cedet/common/cedet.el")
;; ecb
-(add-to-list 'load-path "/usr/pkg/share/emacs/site-lisp/ecb")
-(require 'ecb-autoloads)
+(require-if-present 'ecb-autoloads)
+(let* ((hosts '(("netbsd." .
+ (("~/sandbox/yxmimeproc" "yxmimeproc")
+ ))
+ ("g1.cuenote.jp" .
+ (("~/sandbox/MR/engine/libycom" "libycom")
+ ))
+ ("aria.cielonegro.org" .
+ (("~/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")
+ ("~/sandbox/_haskell/hxt-compile" "hxt-compile")
+ ("~/src/ghc-6.10.1" "ghc-6.10.1")
+ ("~/sandbox/sugar" "sugar")
+ ))))
+ (paths (cdr (assoc (system-name) hosts))))
+ (setq ecb-source-path paths))
;; leim
-(require 'gaelic)
+(require-if-present 'gaelic)
;; rnc-mode
(autoload 'rnc-mode "rnc-mode")
(require 'ido)
(ido-mode t)
-;; diary and todo
-(add-hook 'diary-display-hook 'fancy-diary-display)
-(add-hook 'list-diary-entries-hook 'include-other-diary-files)
-(add-hook 'diary-hook 'appt-make-list)
-;(add-hook 'mark-diary-entries-hook 'mark-included-diary-files)
-
-(display-time)
-(diary 0)
-
-(global-set-key "\C-ct" 'todo-show)
-(global-set-key "\C-ci" 'todo-insert-item)
-
;; sokoban
(autoload 'sokoban "sokoban.el" "Start a new game of Sokoban." t)
(autoload 'sokoban-mode "sokoban.el" "Play Sokoban in current buffer." t)
(setq sokoban-playerfiles-dir "/usr/local/var/games/emacs-sokoban")
;; nXML
-(load "/usr/pkg/share/emacs/site-lisp/nxml-mode/rng-auto.el")
+(load-file-if-present "/usr/pkg/share/emacs/site-lisp/nxml-mode/rng-auto.el")
(defalias 'xml-mode 'nxml-mode)
(add-to-list 'auto-mode-alist '("\\.xml$" . nxml-mode))
(add-to-list 'auto-mode-alist '("\\.xi$" . nxml-mode))
;; sstp
(autoload 'sstp-mode "sstp" "SSTP Editing Major-Mode" t)
-;; scheme
-(setq scheme-program-name "csi")
-
-;; woman
-(setq woman-manpath
- '("/usr/local/man"
- "/usr/local/share/man"
- "/usr/man"
- "/usr/share/man"
- "/sw/share/man"
- "/usr/local/teTeX/man"
- "/usr/X11R6/man"))
-(setq woman-cache-filename "~/.wmncach.el")
-(setq woman-imenu t)
-(setq woman-use-own-frame nil)
-
;; ruby-mode
(autoload 'ruby-mode "ruby-mode" "Mode for editing ruby source files")
(setq auto-mode-alist
(setq tramp-default-method "ssh")
;; Haskell
-;(load (expand-file-name "~/sandbox/_haskell/haskell-mode/haskell-site-file"))
-(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
-(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
-;;(add-hook 'haskell-mode-hook 'turn-on-haskell-simple-indent)
-;;(add-hook 'haskell-mode-hook 'turn-on-haskell-hugs)
-(add-hook 'haskell-mode-hook 'turn-on-haskell-ghci)
-(add-to-list 'auto-mode-alist '("\\.hs$" . haskell-mode))
-(add-to-list 'auto-mode-alist '("\\.hsc$" . haskell-mode))
-
(autoload 'haskell-mode "haskell-mode"
"Major mode for editing Haskell scripts." t)
(autoload 'literate-haskell-mode "haskell-mode"
"Major mode for editing literate Haskell scripts." t)
+(add-to-list 'auto-mode-alist '("\\.hs$" . haskell-mode))
+(add-to-list 'auto-mode-alist '("\\.hsc$" . haskell-mode))
+
+(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
+(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
+(add-hook 'haskell-mode-hook 'turn-on-haskell-ghci)
+
;; Hoogle
(autoload 'hoogle-lookup "hoogle" "Hoogle" t)
(global-set-key (kbd "C-c h") 'hoogle-lookup)
-;; c
+;; c-mode
(mapcar (lambda (hook)
(add-hook hook
(lambda () (c-set-style "user"))))
objc-mode-hook
java-mode-hook))
-;; librep
-(setq auto-mode-alist
- (append
- '(("\\.jl$" . lisp-mode))
- auto-mode-alist))
-
;; css
(autoload 'css-mode "css-mode" "For editing CSS file" t)
(setq cssm-indent-level 4)
(autoload 'emacs-wiki-find-file "emacs-wiki" "Emacs Wiki" t)
(defalias 'wiki 'emacs-wiki-find-file)
-;; gnus
-(setq gnus-select-method '(nntp "localhost" (nntp-port-number 1119)))
-
;; cperl
-;; use cperl-mode instead of perl-mode
(defalias 'perl-mode 'cperl-mode)
-;; configuration of indent
-(setq cperl-invalid-face nil)
(setq cperl-indent-level 4)
(setq cperl-indent-parens-as-block t)
-;(global-set-key "\C-c\C-p" 'cperl-mode)
-
-;; Mule-UCS
-;(unless (getenv "NO_MULE_UCS")
-; (require 'un-define))
;; SKK
-;(require 'skk-autoloads)
+(require 'skk-autoloads)
(global-set-key "\C-x\C-j" 'skk-mode)
(global-set-key "\C-xj" 'skk-auto-fill-mode)
(global-set-key "\C-xt" 'skk-tutorial)
-;(setq skk-large-jisyo (expand-file-name "~/sandbox/_input-method/skk/dic/SKK-JISYO.L"))
-;(setq skk-large-jisyo "/sw/share/ddskk/SKK-JISYO.L")
(setq skk-use-jisx0201-input-method t)
(setq skk-rom-kana-rule-list
'(("@" nil "@")
- ("wi" nil ("ヰ" . "ゐ"))
- ("we" nil ("ヱ" . "ゑ"))
- ;;("hh" "h" ("ン" . "ん"))
- ;;("mm" "m" ("ン" . "ん"))
- ("zx" nil ("ゝ" . "ヽ"))
- ("zc" nil ("ゞ" . "ヾ"))))
+ ("wi" nil ("ヰ" . "ゐ"))
+ ("we" nil ("ヱ" . "ゑ"))
+ ;;("hh" "h" ("ン" . "ん"))
+ ;;("mm" "m" ("ン" . "ん"))
+ ("zx" nil ("ゝ" . "ヽ"))
+ ("zc" nil ("ゞ" . "ヾ"))))
(set-input-method 'japanese-skk) ; INPUT METHOD
;; navi2ch
(autoload 'navi2ch "navi2ch" "Navigator for 2ch for Emacs" t)
;; migemo
-(load-library "migemo")
+(require-if-present 'migemo)
;; tiarra-conf
(setq load-path (cons (expand-file-name "~/sandbox/Tiarra") load-path))
(autoload 'tiarra-conf-mode "tiarra-conf" "tiarra.conf editing mode" t)
-;; YaTeX
-;(autoload 'yatex-mode "yatex" "Yet Another LaTeX mode" t)
-;(setq YaTeX-kanji-code 3) ; euc-jp
-;(setq tex-command "/usr/local/teTeX/bin/platex")
-;(push "/usr/local/teTeX/bin" exec-path)
-;(setq auto-mode-alist ;; override default .tex mode rule
-; (cons (cons "\\.tex$" 'yatex-mode) auto-mode-alist))
-
;; po-mode
(autoload 'po-mode "po-mode")
(setq auto-mode-alist
(if (functionp 'paren-activate)
(paren-activate))))
-;; hooks
-(mapcar (lambda (hook)
- (add-hook hook
- (lambda ()
- (local-set-key "\C-m" 'newline-and-indent)
- (local-set-key "\C-j" 'newline)
- )))
- '(perl-mode-hook
- cperl-mode-hook
- java-mode-hook
- javascript-mode-hook
- c-mode-hook
- c++-mode-hook
- objc-mode-hook
- emacs-lisp-mode-hook
- lisp-mode-hook
- yatex-mode-hook
- css-mode-hook
- scheme-mode-hook))
-
-;; Wanderlast
-;(autoload 'wl "wl" "Wanderlust" t)
-;(autoload 'wl-other-frame "wl" "Wanderlust on new frame." t)
-;(autoload 'wl-draft "wl-draft" "Write draft with Wanderlust." t)
-
;;; emacs-w3m
(autoload 'w3m "w3m" "Interface for w3m on Emacs." t)
(autoload 'w3m-browse-url "w3m" "Browse url by w3m." t)
'(canlock-password "a14fa4d2601465d55585c291fa8b3943e189e716")
'(cleite:auto-refresh-interval nil)
'(cleite:measure-srpc-call-time t)
+ '(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")))
'(cperl-merge-trailing-else nil)
+ '(default-frame-alist (quote ((tool-bar-lines . 0) (menu-bar-lines . 1) (width . 80) (height . 25) (right-fringe) (left-fringe))))
'(ecb-add-path-for-not-matching-files (quote (t)))
'(ecb-help-info-path "/sw/share/info/ecb.info")
'(ecb-layout-name "left14")
'(ecb-options-version "2.32")
'(ecb-show-sources-in-directories-buffer (quote always))
- '(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") ("/" "/"))))
'(ecb-tip-of-the-day nil)
'(ecb-tree-buffer-style (quote ascii-guides))
'(ecb-windows-width 0.2)
'(mew-summary-form (quote (type (5 date) " " (14 from) " " t (14 x-classification) " " (30 subj) "|" (0 body))))
'(mouse-wheel-progessive-speed nil)
'(mouse-wheel-scroll-amount (quote (1 ((shift) . 5) ((control)))))
- '(navi2ch-browse-url-browser-function (quote browse-url-with-firefox))
+ '(navi2ch-browse-url-browser-function (quote browse-url-firefox))
'(navi2ch-mona-face-variable (quote navi2ch-mona16-face))
'(navi2ch-mona-on-message-mode t)
'(newsticker-html-renderer (quote w3m-region))