Editorの最近のブログ記事

Windows(XP)上でGNU Emacsを使う場合の忘備。
Emacsのバージョンは22.3。
Meadowを使えとかいうツッコミはなしの方向で。

1.バイナリ配布元
 http://ftp.gnu.org/gnu/emacs/windows/

 ソースからビルドするのが本筋だが、
 WindowsではCygwinやらMinGWが要ったりして面倒なので
 バイナリを落とすのが手っ取り早くて楽。
 (いやCygwinは入れてるけど)

2..emacs
 環境変数HOMEが設定されていれば
 %HOME%\.emacs.d\.init.el の名前で作成する。

;; load-path
;; (setq load-path (cons "~/emacs/site-lisp" load-path))

;; Don't display start-page
(setq inhibit-startup-message t)

;; Hide menu-bar
(tool-bar-mode -1)

;; Show Column-No
(setq column-number-mode t)

;; K&R StyleCC mode config
(require 'cc-mode)
(setq c-default-style "k&r")
(add-hook 'c-mode-common-hook
     	  '(lambda ()
             (progn
               (c-toggle-hungry-state 1)
               (setq c-basic-offset 4 indent-tabs-mode nil))))
(setq auto-mode-alist
      (append
       '(("\\.hpp$" . c++-mode)
         ("\\.h$"   . c++-mode)
         ) auto-mode-alist))

;; auto-indent with RET
(global-set-key "\C-m" 'reindent-then-newline-and-indent)
(global-set-key "\C-j" 'newline)

;; Window configuration
(if window-system (progn
  (setq initial-frame-alist '((width . 100) (height . 50) (top . 0) (left .
0)))
))




































私の場合はこんな感じ。
%HOME%が設定されていない場合は公式FAQ参照。