Update cc-mode
This commit is contained in:
parent
5f62a7cafe
commit
0824f6336e
1 changed files with 12 additions and 2 deletions
|
@ -73,11 +73,21 @@
|
|||
("\\.cl$" . lisp-mode)))
|
||||
|
||||
(use-package cc-mode
|
||||
;; https://www.gnu.org/prep/standards/html_node/Writing-C.html
|
||||
:ensure nil
|
||||
;; :hook (c-mode . eglot-ensure)
|
||||
:hook (c-mode-common . c-toggle-auto-newline)
|
||||
:custom
|
||||
(c-basic-offset 2)
|
||||
(c-default-style '((c-mode . "gnu"))))
|
||||
(fill-column 79) ; according to gnu style guide
|
||||
(c-basic-offset 2) ; ""
|
||||
:config
|
||||
(defun my-c-mode-hook ()
|
||||
(c-set-style
|
||||
(if (and (buffer-file-name)
|
||||
(string-match "/usr/src/linux" (buffer-file-name)))
|
||||
"linux"
|
||||
"gnu")))
|
||||
(add-hook 'c-mode-hook 'my-c-mode-hook))
|
||||
|
||||
(use-package js-mode
|
||||
:ensure nil
|
||||
|
|
Loading…
Add table
Reference in a new issue