;;;; ----------------------------------------------- ;;;; .emacs file ;;;; (2004.12.04 H.Morii) ;;;; ----------------------------------------------- ;;;; ----------------------------------------------- ;;;; load-path ;;;; ----------------------------------------------- (setq load-path (append '("~/lisp/") load-path) ) ;;;; ----------------------------------------------- ;;;; load ;;;; ----------------------------------------------- ;;;; 1. apperance.el ;;;; 主にwindow-sytemで動作時の外観(カーソル色など)の設定 (load "~/lisp/apperance") ;;;; 2. keyset.el ;;;; キーの動作の設定 (C-hをbackspaceに, 括弧を自動で閉じる, etc.) (load "~/lisp/keyset") ;;;; 3. faces.el ;;;; fontの種類や色の設定 (load "~/lisp/faces") ;(global-font-lock-mode 1) ;;;; ----------------------------------------------- ;;;; Basic Settings ;;;; ----------------------------------------------- (setq default-major-mode 'fundamental-mode) ;; Major mode for new buffers (setq next-screen-context-lines 4) (setq search-highlight t) ;; incremental search highlights (setq completion-auto-help nil) ;; show help only when hitting '?' (setq-default tab-width 4) (setq-default indent-tabs-mode nil) ;; Indentation can insert tabs ;; if this is non-nil. (setq inhibit-startup-message t) (setq inhibit-startup-echo-area-message nil) (setq initial-major-mode 'fundamental-mode) ;; *scratch* ;; 'lisp-interaction-mode(default) ;;;; ----------------------------------------------- ;;;; applications ;;;; ----------------------------------------------- ;;;; 1. YaTeX (野鳥) ;; yatex-mode を起動させる設定 (setq auto-mode-alist (cons (cons "\\.tex$" 'yatex-mode) auto-mode-alist)) (autoload 'yatex-mode "yatex" "Yet Another LaTeX mode" t) ;; 野鳥が置いてある directry の load-path 設定 ;; default で load-path が通っている場合は必要ありません (setq load-path (cons (expand-file-name "~/lisp/yatex/emacs/site-lisp/yatex") load-path)) ;; 文章作成時の漢字コードの設定 ;; 1 = Shift_JIS, 2 = ISO-2022-JP, 3 = EUC-JP ;; default は 2 (setq YaTeX-kanji-code 3) ; euc-jp ;;;; 2. trr (2004.10.22) (autoload 'trr "/home/moriih/lisp/trr/trr" nil t) ;;;; 3. sdic (英和/和英辞典 : M-x sdic で呼び出し) ;;; sdic-mode 用の設定 (setq load-path (cons "/home/moriih/lisp/sdic" load-path)) (autoload 'sdic-describe-word "sdic" "英単語の意味を調べる" t nil) (global-set-key "\C-cw" 'sdic-describe-word) (autoload 'sdic-describe-word-at-point "sdic" "カーソルの位置の英単語の意味を調 べる" t nil) (global-set-key "\C-cW" 'sdic-describe-word-at-point) ;;;; 4. kumac-mode (autoload 'kumac-mode "kumac-mode" "Mode for editing KUMAC files." t) (setq auto-mode-alist (cons (cons "\\.kumac$" 'kumac-mode) auto-mode-alist)) ;;;; ----------------------------------------------- ;;;; misc settings ;;;; ----------------------------------------------- ; *scratch* バッファを空で開く (setq intial-scratch-message nil) ;; カーソルの位置をメニューバーに表示する (line-number-mode t) (column-number-mode t) ;; 最下行で↓を押しても勝手に行を増やさない (setq next-line-add-newlines nil) ;; マークした範囲(リージョン)をハイライトする (transient-mark-mode 1) ;; C-kで改行も含めてカットする (setq kill-whole-line t) ;; カーソルによる画面移動を滑らかにする ;; (ref. http://www.tky.3web.ne.jp/~applause/emacs-lisp/) (load "~/lisp/ce-scroll") (setq scroll-conservatively 1) ;; オートセーブファイル(#filename#)を作成しない ; (setq auto-save-default nil) ; (setq auto-save-list-file-name nil) ; (setq auto-save-list-file-prefix nil) ;; バックアップファイル(filename~)を作成しない (setq make-backup-files nil) ;; 長い文章の折り返しで物理的に次の行に移動 (global-set-key "\C-p" 'previous-window-line) (global-set-key "\C-n" 'next-window-line) (global-set-key [up] 'previous-window-line) (global-set-key [down] 'next-window-line) (defun previous-window-line (n) (interactive "p") (let ((cur-col (- (current-column) (save-excursion (vertical-motion 0) (current-column))))) (vertical-motion (- n)) (move-to-column (+ (current-column) cur-col))) (run-hooks 'auto-line-hook) ) (defun next-window-line (n) (interactive "p") (let ((cur-col (- (current-column) (save-excursion (vertical-motion 0) (current-column))))) (vertical-motion n) (move-to-column (+ (current-column) cur-col))) (run-hooks 'auto-line-hook) ) ;; 日付/時刻表示 ;(setq display-time-24hr-format t) ;(setq display-time-format "%m/%d(%a) %R") ;(setq display-time-day-and-date t) ;(display-time) ;;;; .incファイルをFORTRANモードで開く (setq auto-mode-alist (cons (cons "\\.inc$" 'fortran-mode) auto-mode-alist))