* .emacs [#k45c6b57] ** C言語のindent設定 [#we17460a] - 21.4.1 で動作する設定をやっと見つけた。他ver で動くかは知らない。 *** http://d.hatena.ne.jp/gomi-box/20071022/1193036225 [#ee1cc484] ;; c-mode-hock(C言語のインデントの設定) (defun my-c-mode-hook () (c-set-style "stroustrup") (setq indent-tabs-mode nil) (setq c-basic-offset 4) (c-toggle-auto-state -1) (define-key c-mode-base-map "\C-m" 'newline-and-indent)) (add-hook 'c-mode-hook 'my-c-mode-hook) ;; c++-mode-hock(C++のインデントの設定) (defun my-c++-mode-hook () (c-set-style "stroustrup") (setq indent-tabs-mode nil) (setq c-basic-offset 4) (c-toggle-auto-state -1) (define-key c-mode-base-map "\C-m" 'newline-and-indent)) (add-hook 'c++-mode-hook 'my-c++-mode-hook) |