From 91f444b867810f1ada980b705866b0ea9419d01c Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 9 May 2015 17:05:36 -0700 Subject: [PATCH] code_style for emacs --- DEVEL/code_style.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/DEVEL/code_style.txt b/DEVEL/code_style.txt index 7004a8640..e76a4ad36 100644 --- a/DEVEL/code_style.txt +++ b/DEVEL/code_style.txt @@ -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) +