loading...

re: [Emacs] Auto runs clang-format when file save VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Thanks for this guide! I found that this configuration essentially forces the "before-save-hook" to always run "clang-format-buffer" once you loa...
 

I have the same problem. I solved it by doing

(add-hook 'c-common-mode-hook 
  (lambda ()
    (add-hook (make-local-variable 'before-save-hook)
              'clang-format-buffer)))
 

thank you both of them.
I will update for article and my init.el

Code of Conduct Report abuse