code_style for emacs

This commit is contained in:
PatR
2015-05-09 17:05:36 -07:00
parent 2dc2091626
commit 91f444b867

View File

@@ -179,3 +179,16 @@ many entries that reproducing them here is impractical. Fortunately, the
options are in plain English, so walking through them with a copy of
this Guide handy and making changes as required will suffice.
emacs Configuration
===================
There are no doubt umpteen different ways to handle this in emacs.
Putting the following in ~/.emacs.el is one
(defun hook-c ()
(setq c-set-style "k&r")
(setq c-basic-offset 4)
(setq indent-tabs-mode nil)
(c-set-offset 'knr-argdecl-intro 0))
(add-hook 'c-mode-common-hook 'hook-c)