aboutsummaryrefslogtreecommitdiff
path: root/emacs
diff options
context:
space:
mode:
authorHenry J. Webster <hwebs@hwebs.info>2026-10-28 16:52:27 -0500
committerHenry J. Webster <hwebs@hwebs.info>2026-10-28 16:52:35 -0500
commitc7684de8c4681fe54903b81f18c3b56164ee4501 (patch)
tree95bfd1e392f5187f21fdbe2e663e56ee3f178153 /emacs
parent513307eaec52126d75e1d499d88a830fb5f84121 (diff)
emacs: comment column wrapping
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.config/emacs/init.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/emacs/.config/emacs/init.el b/emacs/.config/emacs/init.el
index 466cdac..719748e 100644
--- a/emacs/.config/emacs/init.el
+++ b/emacs/.config/emacs/init.el
@@ -12,6 +12,12 @@
;; Automatically wrap prose in text mode and its derived modes.
(add-hook 'text-mode-hook #'turn-on-auto-fill)
+;; Automatically wrap C comments, but not code, at 80 columns.
+(add-hook 'c-mode-hook
+ (lambda ()
+ (setq-local comment-auto-fill-only-comments t)
+ (auto-fill-mode 1)))
+
;; Keep recovery files out of projects and the configuration directory.
(let* ((xdg-state (getenv "XDG_STATE_HOME"))
(state-dir