Software Engineer and Web Developer's Diary

1年後の自分に向けて

Meadow での .emacs の設定

以下は私の最新の .emacs の設定です。変更する度に更新していこうと思います。

(cd "~")

(set-language-environment "Japanese")

(mw32-ime-initialize) (setq default-input-method "MW32-IME")

;;euc (setq default-buffer-file-coding-system 'euc-japan-unix)

;;font (create-fontset-from-request "private-fontset" '*1 '*2

;;color (global-font-lock-mode t) (require 'font-lock)

;;transient-mark-mode (transient-mark-mode t)

;;line number (require 'setnu) (global-set-key [f12] 'setnu-mode)

;;toggle (global-set-key [f8] 'toggle-truncate-lines)

;;windmove-default-keybindings (windmove-default-keybindings)

;;not use backupfile (setq make-backup-files nil)

;;iswitchb-mode (iswitchb-mode t)

;;shell (setq explicit-shell-file-name "bash.exe") (setq shell-file-name "bash.exe") (setq shell-command-switch "-c")

;;tab (setq-default tab-width 4) (setq-default c-basic-offset 4) (setq-default indent-tabs-mode nil)

;;php (load-library "php-mode-120") (require 'php-mode) (add-to-list 'auto-mode-alist '(".inc$" . php-mode)) (add-to-list 'auto-mode-alist '(".tpl$" . php-mode)) (add-to-list 'auto-mode-alist '(".thtml$" . php-mode))

(add-hook 'php-mode-user-hook '(lambda () (setq tab-width 4) (setq c-basic-offset 4) (setq indent-tabs-mode nil) (setq php-manual-path "~/php/doc")) )

;;show-paren-mode (show-paren-mode t) (setq show-paren-style 'mixed) (set-face-background 'show-paren-match-face "gray10") (set-face-foreground 'show-paren-match-face "SkyBlue")

;;svn todo (add-to-list 'vc-handled-backends 'SVN)

;;zengaku space tab (defface my-face-b-1 '*3 (font-lock-add-keywords major-mode '( (" " 0 my-face-b-1 append) ("t" 0 my-face-b-2 append) ("[ ]+$" 0 my-face-u-1 append) ))) (ad-enable-advice 'font-lock-mode 'before 'my-font-lock-mode) (ad-activate 'font-lock-mode) (add-hook 'find-file-hooks '(lambda () (if font-lock-mode nil (font-lock-mode t))) t)

*1:width . 8) (height . 16) (fixed . t) (italic . nil

*2:family . "MS ゴシック") (family . "Courier New")))

;; font shinonome(不要なら nil にする) (setq bdf-font-directory-shinonome "D:/apps/Meadow/fonts/shinonome") (setq bdf-use-shinonome12 t bdf-use-shinonome12min t bdf-use-shinonome12maru t bdf-use-shinonome14 t bdf-use-shinonome14min t bdf-use-shinonome16 t bdf-use-shinonome16min t) (load "meadow2-shinonome-fontset")

;;font default set (setq default-frame-alist (append (list '(font . "shinonome12") '(top . 10) '(left . 20) '(width . 80) '(height . 50) ) default-frame-alist

*3:t (:background "medium aquamarine"))) nil) (defface my-face-b-2 '((t (:background "gray26"))) nil) (defface my-face-u-1 '((t (:foreground "SteelBlue" :underline t))) nil) (defvar my-face-b-1 'my-face-b-1) (defvar my-face-b-2 'my-face-b-2) (defvar my-face-u-1 'my-face-u-1) (defadvice font-lock-mode (before my-font-lock-mode (