Le 01/10/2015 00:43, Pavel Sanda a écrit :
Jean-Marc Lasgouttes wrote:
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)
I have merged your example with mine and pushed it to
developement/coding/emacs
This is interesting, I thought default tab is 8 and always
edited our sources this way. Kind of surprising that we didn't
conflicted yet about the visual appearance of indented blocks,
like in void ViewSourceWidget::restoreSession recently committed
by Guillaume.
The various sources I found were very clear about 4. I saw such mismatch
in trac, which is improperly configured to display 8.
Guillaume