From 3fcc66c8e9481038826e4b82c29b6ae78db559e0 Mon Sep 17 00:00:00 2001 From: pho Date: Mon, 8 Dec 2008 19:33:04 +0900 Subject: [PATCH] Auto commit by The Sugar System. --- dot-files/_emacs_bmk | 8 +- dot-files/_emacs_el | 214 +++++++++++++------------------------------ 2 files changed, 70 insertions(+), 152 deletions(-) diff --git a/dot-files/_emacs_bmk b/dot-files/_emacs_bmk index 62e328b..f4fa547 100644 --- a/dot-files/_emacs_bmk +++ b/dot-files/_emacs_bmk @@ -8,22 +8,22 @@ (rear-context-string) (position . 1))) ("emacs.el" - ((filename . "/Users/admin/sandbox/dotfiles/emacs.el") + ((filename . "~/.emacs.el") (front-context-string . ";; -*- Coding: u") (rear-context-string) (position . 1))) (".zshrc" - ((filename . "/Users/admin/.zshrc") + ((filename . "~/.zshrc") (front-context-string . "#!/bin/zsh\nbindk") (rear-context-string) (position . 1))) ("defence-tmpl.conf" - ((filename . "/Users/admin/tmp/Tiarra/defence-tmpl.conf") + ((filename . "~/tmp/Tiarra/defence-tmpl.conf") (front-context-string . "# -*- tiarra-con") (rear-context-string) (position . 1))) ("tiarra.conf" - ((filename . "/Users/admin/sandbox/Tiarra/tiarra.conf") + ((filename . "~/sandbox/Tiarra/tiarra.conf") (front-context-string . "# -*- tiarra-con") (rear-context-string) (position . 1)))) diff --git a/dot-files/_emacs_el b/dot-files/_emacs_el index a286103..233ed12 100644 --- a/dot-files/_emacs_el +++ b/dot-files/_emacs_el @@ -1,26 +1,18 @@ -;; -*- 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) @@ -32,72 +24,80 @@ (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") + nil ; ignore + (apply 'signal (car e) (cdr e)))))) ; rethrow + +(defun load-file-if-present (path) + (if (file-exists-p path) + (load-file path))) ;; flyspell -(require 'flyspell) +(require-if-present 'flyspell) ;; mic-paren -(require 'mic-paren) +(require-if-present '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) ;; leim -(require 'gaelic) +(require-if-present 'gaelic) ;; rnc-mode (autoload 'rnc-mode "rnc-mode") @@ -123,18 +123,6 @@ (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) @@ -151,22 +139,6 @@ ;; 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 @@ -184,25 +156,23 @@ (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")))) @@ -211,12 +181,6 @@ 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) @@ -231,58 +195,37 @@ (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 @@ -318,31 +261,6 @@ (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) -- 2.40.0