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:
Antoine Martin 2020-04-21 23:01:10 +02:00
parent 35dbd7af25
commit 772d3e4e69

View file

@ -105,8 +105,9 @@ nice.
Setup the default format for C/C++ editing.
#+BEGIN_SRC emacs-lisp
(add-hook! (c-mode c++-mode)
(setq c-default-style "gnu")
(setq c-basic-offset 2)
(setq c-basic-offset 2))
#+END_SRC
Flycheck never works well for C / C++ without configuration or a CMake build