From 703f2c9a60773989a8e434d00b2e32a8cd9afcbd Mon Sep 17 00:00:00 2001 From: Jakob L. Kreuze Date: Sun, 3 Feb 2019 18:14:43 -0500 Subject: Add configuration for cc-mode --- jakob.org | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/jakob.org b/jakob.org index 72048db..67a399a 100644 --- a/jakob.org +++ b/jakob.org @@ -1670,3 +1670,20 @@ code, keybindings, symbol properties, and more. ("C-h C" . helpful-command) ("C-c C-d" . helpful-at-point))) #+END_SRC +* cc + +Generally, I adhere to the [[https://www.kernel.org/doc/html/v4.10/process/coding-style.html][Linux kernel coding style]]. + +#+BEGIN_SRC elisp +(use-package cc-mode + :hook + (c-mode . (lambda () (c-set-style "linux"))) +#+END_SRC + +Automatically insert the leading asterisk when continuing a multi-line comment. + +#+BEGIN_SRC elisp + :bind + (:map c-mode-map + ("RET" . c-indent-new-comment-line))) +#+END_SRC -- cgit v1.3