From 24ae209358904f6515e2f230c735a70bde7bc6dd Mon Sep 17 00:00:00 2001 From: Guillaume Munch Date: Thu, 1 Oct 2015 22:06:01 +0100 Subject: [PATCH] Example Emacs configuration --- development/coding/emacs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 development/coding/emacs diff --git a/development/coding/emacs b/development/coding/emacs new file mode 100644 index 0000000000..518e571cb2 --- /dev/null +++ b/development/coding/emacs @@ -0,0 +1,29 @@ +Sample configuration to match the coding style in use. + +In .emacs: + +(custom-set-variables + '(c-basic-indent 4) + '(safe-local-variable-values + (quote + ((c-set-offset + (quote innamespace) + 0) + (c-set-style . "CC-MODE")))) +) +;; no indent in namespace +(defun my-c-setup () + (c-set-offset 'innamespace [0])) +(add-hook 'c++-mode-hook 'my-c-setup) + + +In .dir-local.el: + +((nil . ((indent-tabs-mode . t) + (tab-width . 4) + (fill-column . 80))) + (c-mode . ((c-basic-offset . 4) + (c-set-style . "CC-MODE"))) + (c++-mode . ((c-basic-offset . 4) + (c-set-style . "CC-MODE"))) + )