Make sure c-basic-indent sticks
The previous solution worked but it would sometimes reset to its default value of 4, surely because of another mode loading and resetting it. This should fix it for good.
This commit is contained in:
parent
35dbd7af25
commit
772d3e4e69
|
@ -105,8 +105,9 @@ nice.
|
||||||
Setup the default format for C/C++ editing.
|
Setup the default format for C/C++ editing.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq c-default-style "gnu")
|
(add-hook! (c-mode c++-mode)
|
||||||
(setq c-basic-offset 2)
|
(setq c-default-style "gnu")
|
||||||
|
(setq c-basic-offset 2))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Flycheck never works well for C / C++ without configuration or a CMake build
|
Flycheck never works well for C / C++ without configuration or a CMake build
|
||||||
|
|
Loading…
Reference in a new issue