From c7684de8c4681fe54903b81f18c3b56164ee4501 Mon Sep 17 00:00:00 2001 From: "Henry J. Webster" Date: Wed, 28 Oct 2026 16:52:27 -0500 Subject: emacs: comment column wrapping --- emacs/.config/emacs/init.el | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'emacs/.config') 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 -- cgit v1.3