;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; 日本語環境設定 (set-language-environment "Japanese") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;ロードパスの指定 ; Lisp ライブラリの load path に "~/lib" を追加します。 ;このディレクトリに入れておくと、**.elファイルが使えるようになります。 ;;(setq load-path (cons (expand-file-name "~/lib")load-path)) (setq load-path (cons (expand-file-name "c:/meadow/site-lisp/keisen")load-path)) (setq load-path (cons (expand-file-name "c:/meadow/2.10/lisp")load-path)) (setq load-path (cons (expand-file-name "c:/meadow/site-lisp/ufm")load-path)) (setq load-path (cons (expand-file-name "c:/meadow/site-lisp")load-path)) (load-library "keisen-mule") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; shell の設定 ;; ;;; Virtually UN*X!にある tcsh.exe を使う場合 ;; (setq explicit-shell-file-name "tcsh.exe") ;; (setq shell-file-name "tcsh.exe") ;; (setq shell-command-switch "-c") ;; ;;; WindowsNT に付属の CMD.EXE を使う場合。 (setq explicit-shell-file-name "cmdproxy.exe") (setq shell-file-name "cmdproxy.exe") (setq shell-command-switch "/C") (setq win32-quote-process-args "" ) ;; cygwin bash ---------------------------------------- ;(setq explicit-shell-file-name "bash.exe") ;(setq shell-file-name "bash.exe") ;(setq shell-command-switch "-ic") ;(setq shell-command-switch "-c") ; (setq my-comint-process-coding-system '(undecided-dos sjis-unix)) ; (defun my-shell-mode-hook () ; (setq comint-input-sender (function my-comint-simple-send))) ; (defun my-comint-simple-send (proc string) ; (run-hooks 'my-comint-send-hook) ; (comint-send-string proc string) ; (comint-send-string proc "\n")) ; (defun my-comint-send-hook () ; (apply 'set-buffer-process-coding-system my-comint-process-coding-system)) ; (eval-after-load "shell" ; '(progn ; (add-hook 'shell-mode-hook 'my-shell-mode-hook) ; (add-hook 'my-comint-send-hook 'my-comint-send-hook))) ;;; ^M をとる ;; (add-hook 'comint-output-filter-functions 'shell-strip-ctrl-m nil t) ;;(set-default-coding-systems 'euc-jp-unix) ;;(set-terminal-coding-system 'euc-jp-unix) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; c,java等の設定 (setq c-mode-hook '(lambda () (setq version-control 'never) (setq default-tab-width '4) (setq tab-width '4))) (setq text-mode-hook '(lambda () (setq version-control 'never) (setq default-tab-width '4) (setq tab-width '4))) ;;indent に tab コードを使用しない (setq-default indent-tabs-mode nil) ;;; http://www.geocities.co.jp/SiliconValley-PaloAlto/5236/mule/cc-mode.html ;;; cc-mode.el の使用 (fmakunbound 'c-mode) (makunbound 'c-mode-map) (fmakunbound 'c++-mode) (makunbound 'c++-mode-map) (makunbound 'c-style-alist) (autoload 'c-mode "cc-mode" "C Editing Mode" t) (autoload 'c++-mode "cc-mode" "C++ Editing Mode" t) (autoload 'objc-mode "cc-mode" "Objective-C Editing Mode" t) (autoload 'java-mode "cc-mode" "Java Editing Mode" t) (setq auto-mode-alist (append '( ("\\.c$" . c-mode) ("\\.h$" . c-mode) ("\\.java$" . java-mode) ("\\.m$" . objc-mode) ("\\.c\\+\\+$" . c++-mode) ("\\.cpp$" . c++-mode) ("\\.cc$" . c++-mode) ("\\.hh$" . c++-mode) ) auto-mode-alist)) (defconst my-style '( ;; インデント幅を空白4コ分にする (c-basic-offset . 4) ;; コメントだけの行のインデント幅 ;(c-comment-only-line-offset . 4) ;; インデント量の設定 (c-offsets-alist . ( (comment-intro . 0) (case-label . 0) ; or 2 (statement-case-intro . 4) ; or 2 ;(access-label . 0) )) ;; '{' や '}' での改行の制御 ;(c-hanging-braces-alist . ( ; ;; デフォルトは以下の4つ ; (brace-list-open) ; (substatement-open after) ; (block-close . c-snug-do-while) ; (extern-lang-open after) ; ;; 以下を追加 ; (brace-list-close) ; ;(class-open after) ; (class-close before) ; (inline-open after) ; (arglist-cont-noempty after) ; (statement-cont after) ; )) ;; '}' で改行したのをもどす ;(c-cleanup-list . ( ; ;brace-else-brace ; empty-defun-braces ; ;defun-close-semi ; list-close-comma ; scope-operator ; )) ) "My Style" ) ;;; ;;; cc-mode共通の設定 ;;; (add-hook 'c-mode-common-hook '(lambda () ;; 自分用のスタイルを使う (c-add-style "my-style" my-style t) (c-set-style "my-style") ;; いつでも TAB でインデントしない (setq c-tab-always-indent nil) (setq default-tab-width '4) (setq tab-width '4) ;; hungry-state にしない (c-toggle-hungry-state -1) ;; ;; 新規作成時だけ auto-indent にする ;;(if (not (file-exists-p buffer-file-name)) ;; (c-toggle-auto-state 1)) ;; C-c C-c でコンパイル, C-c c でコメントアウト (define-key c-mode-map "\C-c\C-c" 'compile) (define-key c-mode-map "\C-cc" 'comment-region) (define-key c-mode-map "\C-cu" 'uncomment-region) ;; コンパイルウインドウの大きさを制限する (setq compilation-window-height 8) ;; 最終行から カーソル移動での新規行を禁止する。 (setq next-line-add-newlines nil) )) ;; end c-mode-common-hook ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; java 環境 (require 'jde) (autoload 'jde-mode "jde" "Java Development Environment for Emacs." t) (setq auto-mode-alist (cons '("\.java$" . jde-mode) auto-mode-alist)) ;;(autoload 'jde-mode "jde" "Java Development Environment for Emacs." t) ;;(setq auto-mode-alist ;; (cons '("\.java$" . jde-mode) auto-mode-alist) ) (fset 'w32-focus-frame 'x-focus-frame) (jde-project-file-version "1.0") (jde-set-variables '(bsh-vm-args (quote (("-Duser.language=en")))) '(jde-jdk-registry (quote (("1.4.2_04" . "c:/j2sdk1.4.2_04"))))) (custom-set-variables ;; custom-set-variables was added by Custom -- don't edit or cut/paste it! ;; Your init file should contain only one such instance. '(jde-compile-option-classpath (quote ("c:/idkDoja3.5/lib" "c:/j2sdkee1.3.1/lib" "."))) '(jde-compiler (quote ("javac" "c:/j2sdk1.4.2_04/bin/javac.exe"))) '(jde-jdk-registry (quote (("1.4.2_04" . "c:/j2sdk1.4.2_04"))))) (custom-set-faces ;; custom-set-faces was added by Custom -- don't edit or cut/paste it! ;; Your init file should contain only one such instance. ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ユーザ用初期化ファイル ;; ~/.emacs.my.el に個人用設定を書けます。 ;; このファイルを直接いじりたくない場合は、個人設定を分離してください (if (file-exists-p (expand-file-name "~/.emacs.my.el")) (load (expand-file-name "~/.emacs.my.el") nil t nil)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; 初期フレームの設定 (setq default-frame-alist (append (list '(foreground-color . "black") '(background-color . "LemonChiffon") '(background-color . "gray") '(border-color . "black") '(mouse-color . "white") '(cursor-color . "black") ; '(font . "shinonome16-fontset") ; '(font . "shinonome12-fontset") '(font . "shinonome14-fontset") '(width . 80) '(height . 51) '(top . 0) '(left . 160)) default-frame-alist)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; 前回デスクトップ環境をロード (load "desktop") (desktop-load-default) (desktop-read)