Le 15/09/2015 17:54, Guillaume Munch a écrit :
I can remove more irrelevant parts and do that, but before that I am hoping to get some better configuration if anybody else is using emacs. BSD is just close to your style; the question is more: what is the proper style to use?
Personally, I have the following, but have no idea of where it comes from. I am open to something better (especially avoiding indenting in namespace).
;; Common hook (defun my-c-mode-common-hook () ;; Set return Style ; (local-set-key [return] 'newline-and-indent) ; (local-set-key [S-return] 'newline) (c-set-style "CC-MODE") (setq compile-command "make -k") ) (add-hook 'c-mode-common-hook 'my-c-mode-common-hook) ;; C++ mode hook (defun my-c++-mode-hook () ;; Style parameters (setq c-basic-offset 4 tab-width 4) (c-set-offset 'innamespace 0) ) (add-hook 'c++-mode-hook 'my-c++-mode-hook) JMarc