~/lib/conf/emacs/package.el
;; load-path
(setq load-path
(append
'(
"~/lib/conf/emacs/site-lisp/apel"
"~/lib/conf/emacs/site-lisp/elscreen"
"~/lib/conf/emacs/site-lisp/emu"
"~/lib/conf/emacs/site-lisp/flim"
"~/lib/conf/emacs/site-lisp/gnuplot-mode"
"~/lib/conf/emacs/site-lisp/howm"
"~/lib/conf/emacs/site-lisp/ruby-mode"
"~/lib/conf/emacs/site-lisp/semi"
"~/lib/conf/emacs/site-lisp/w3m"
"~/lib/conf/emacs/site-lisp/wl"
"~/lib/conf/emacs/site-lisp/riece"
"~/lib/conf/emacs/site-lisp/yatex"
)
load-path))
;;;;;;;;;;;;;;;;;;;;
;; dot-mode
;;;;;;;;;;;;;;;;;;;;
(load-file "~/lib/conf/emacs/site-lisp/dot-mode/graphviz-dot-mode.el")
;;;;;;;;;;;;;;;;;;;;
;; gnuplot-mode
;;;;;;;;;;;;;;;;;;;;
;; these lines enable the use of gnuplot mode
(autoload 'gnuplot-mode "gnuplot" "gnuplot major mode" t)
(autoload 'gnuplot-make-buffer "gnuplot" "open a buffer in gnuplot mode" t)
;; this line automatically causes all files with the .gp extension to
;; be loaded into gnuplot mode
(setq auto-mode-alist (append '(("\\.gp$" . gnuplot-mode)) auto-mode-alist))
;;;;;;;;;;;;;;;;;;;;
;; howm
;;;;;;;;;;;;;;;;;;;;
(setq howm-menu-lang 'ja)
(global-set-key "\C-c,," 'howm-menu)
(autoload 'howm-menu "howm" "Hitori Otegaru Wiki Modoki" t)
(eval-after-load "calendar"
'(progn
(define-key calendar-mode-map
"\C-m" 'my-insert-day)
(defun my-insert-day ()
(interactive)
(let ((day nil)
(calendar-date-display-form
'("[" year "-" (format "%02d" (string-to-int month))
"-" (format "%02d" (string-to-int day)) "]")))
(setq day (calendar-date-string
(calendar-cursor-to-date t)))
(exit-calendar)
(insert day)))))
;;;;;;;;;;;;;;;;;;;;
;; ispell
;;;;;;;;;;;;;;;;;;;;
(autoload 'ispell-word
"ispell" "Check the spelling of word in buffer." t)
(autoload 'ispell-region
"ispell" "Check the spelling of region." t)
(autoload 'ispell-buffer
"ispell" "Check the spelling of buffer." t)
(autoload 'ispell-complete-word
"ispell" "Look up current word in dictionary and try to complete it." t)
(autoload 'ispell-change-dictionary
"ispell" "Change ispell dictionary." t)
(autoload 'ispell-message
"ispell" "Check spelling of mail message or newsx post.")
(defun ispell-tex-buffer-p ()
(memq major-mode '(plain-tex-mode latex-mode slitex-mode yatex-mode)))
(setq ispell-enable-tex-parser t)
;; 日本語交じりの文書を扱う
(eval-after-load "ispell"
'(add-to-list 'ispell-skip-region-alist '("[^\000-\377]+")))
;; latex 文書を扱う
(setq ispell-filter-hook-args '("-w"))
(setq TeX-mode-hook
(function
(lambda ()
(setq ispell-filter-hook "detex"))))
(setq ispell-program-name "/usr/bin/aspell")
;;;;;;;;;;;;;;;;;;;;
;; elscreen
;;;;;;;;;;;;;;;;;;;;
;; prefix key
;;(setq elscreen-prefix-key "\C-z")
;; disable tab
(setq elscreen-display-tab nil)
;; start elscreen if emacs-version >= 22 && using window-system
(if (and (>= emacs-major-version 22) window-system)
(load "elscreen" "ElScreen" t))
;; show the screen list on frame title
(defun elscreen-frame-title-update ()
(when (elscreen-screen-modified-p 'elscreen-frame-title-update)
(let* ((screen-list (sort (elscreen-get-screen-list) '<))
(screen-to-name-alist (elscreen-get-screen-to-name-alist))
(title (mapconcat
(lambda (screen)
(format "%d%s %s"
screen (elscreen-status-label screen)
(get-alist screen screen-to-name-alist)))
screen-list " ")))
(if (fboundp 'set-frame-name)
(set-frame-name title)
(setq frame-title-format title)))))
(eval-after-load "elscreen"
'(add-hook 'elscreen-screen-update-hook 'elscreen-frame-title-update))
;;;;;;;;;;;;;;;;;;;;
;; mpg123
;;;;;;;;;;;;;;;;;;;;
;;(if (= (call-process "which" nil nil nil "mpg123") 0)
(if (and (= (call-process "which" nil nil nil "mpg123") 0)
window-system)
(progn
(load-file "~/lib/conf/emacs/site-lisp/mpg123/mpg123.el")
(setq mpg123-display-slider nil)
;; id3 tag modify addon
(load "~/lib/conf/emacs/site-lisp/id3/id3.el")
))
;;;;;;;;;;;;;;;;;;;;
;; riece (IRC)
;;;;;;;;;;;;;;;;;;;;
(autoload 'riece "riece" "Riece mode" t)
;;;;;;;;;;;;;;;;;;;;
;; ruby-mode
;;;;;;;;;;;;;;;;;;;;
(autoload 'ruby-mode "ruby-mode"
"Mode for editing ruby source files" t)
(setq auto-mode-alist
(append '(("\\.rb$" . ruby-mode)) auto-mode-alist))
(setq interpreter-mode-alist (append '(("ruby" . ruby-mode))
interpreter-mode-alist))
(autoload 'run-ruby "inf-ruby"
"Run an inferior Ruby process")
(autoload 'inf-ruby-keys "inf-ruby"
"Set local key defs for inf-ruby in ruby-mode")
(add-hook 'ruby-mode-hook
'(lambda ()
(inf-ruby-keys)))
;;;;;;;;;;;;;;;;;;;;
;; verilog-mode
;;;;;;;;;;;;;;;;;;;;
(load-file "~/lib/conf/emacs/site-lisp/verilog-mode/verilog-mode.el")
(autoload 'verilog-mode "verilog-mode" "Verilog mode" t )
;; Any files that end in .v should be in verilog mode
(setq auto-mode-alist (cons '("\\.v\\'" . verilog-mode) auto-mode-alist))
(setq auto-mode-alist (cons '("\\.tb\\'" . verilog-mode) auto-mode-alist))
;;(setq auto-mode-alist
;; (cons '("\\.v_rout\\'" . verilog-mode) auto-mode-alist))
;; Any files in verilog mode shuold have their keywords colorized
(setq verilog-indent-level 4
verilog-indent-level-module 4
verilog-indent-level-declaration 4
verilog-indent-level-behavioral 4
verilog-indent-level-directive 4
verilog-case-indent 4
verilog-auto-newline nil
verilog-auto-indent-on-newline nil
verilog-tab-always-indent t
verilog-auto-endcomments t
verilog-minimum-comment-distance 40
verilog-indent-begin-after-if t
verilog-auto-lineup '())
(add-hook 'verilog-mode-hook
'(lambda ()
(add-hook 'local-write-file-hooks
(lambda() (untabify (point-min) (point-max))))))
;;;;;;;;;;;;;;;;;;;;
;; w3m
;;;;;;;;;;;;;;;;;;;;
;(load-library "migemo")
(autoload 'w3m "w3m" "Interface for w3m on Emacs." t)
(autoload 'w3m-find-file "w3m" "w3m interface function for local file." t)
(autoload 'w3m-browse-url "w3m" "Ask a WWW browser to show a URL." t)
(autoload 'w3m-search "w3m-search" "Search QUERY using SEARCH-ENGINE." t)
(autoload 'w3m-weather "w3m-weather" "Display weather report." t)
(autoload 'w3m-antenna "w3m-antenna" "Report chenge of WEB sites." t)
;(setq w3m-home-page
;(concat "file://" (getenv "HOME") "/conf/html/local.html"))
(setq w3m-home-page (concat "http://www.google.com"))
(setq w3m-use-cookies t)
;;;;;;;;;;;;;;;;;;;;
;; Wanderlust
;;;;;;;;;;;;;;;;;;;;
(load "mime-setup")
(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)
(autoload 'elmo-split "elmo-split" "Split messages on the folder." t)
;;;;;;;;;;;;;;;;;;;;
;; YaTeX-mode
;;;;;;;;;;;;;;;;;;;;x
(autoload 'yatex-mode "yatex" "Yet Another LaTeX mode" t)
(setq auto-mode-alist
(cons (cons "\\.tex$" 'yatex-mode) auto-mode-alist))
(setq dvi2-command "xdvi"
tex-command "platex -src-specials"
dviprint-command-format "dvips %s | lpr"
YaTeX-kanji-code 3)
;;;;;;;;;;;;;;;;;;;;
;; YaHtml-mode
;;;;;;;;;;;;;;;;;;;;
(setq auto-mode-alist
(cons (cons "\\.html$" 'yahtml-mode) auto-mode-alist))
(autoload 'yahtml-mode "yahtml" "Yet Another HTML mode" t)
(setq yahtml-www-browser "firefox")
>> emacsの設定