dotfiles

🎜 Clone'em, tweak'em, stick'em in your $HOME 🎝
git clone https://git.kevinlegouguec.net/dotfiles
Log | Files | Refs | README

commit b82d1fc91d5c41b535c390821c65f70ef232cdb8
parent cdbd66e1a9e847fb7a28555a8f60eed134a222bd
Author: KΓ©vin Le Gouguec <kevin.legouguec@gmail.com>
Date:   Sat, 18 Oct 2025 09:55:39 +0200

Make ChangeLog support in git-commit opt-in

Otherwise M-q becomes annoying when drafting commit messages for
non-GNU projects, since it insists on inserting colons in '*' bullet
lists.

Diffstat:
M.config/emacs/init.el | 16++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/.config/emacs/init.el b/.config/emacs/init.el @@ -437,6 +437,15 @@ list and require no escaping." (cl-return-from my/git-commit-maybe-set-fill-column (setq fill-column column)))))) +(defvar my/git-commit-use-changelog + (list 'my/emacs-repo-p)) + +(defun my/git-commit-maybe-set-changelog-support () + (let ((remotes (my/git-upstreams))) + (when (run-hook-with-args-until-success + 'my/git-commit-use-changelog remotes) + (git-commit-setup-changelog-support)))) + (defun my/revision-at-point () (cond ((derived-mode-p 'magit-mode) @@ -888,8 +897,11 @@ UPSTREAMS is a list of fetch URLs." (use-package git-commit :config (my/setopt-update-list - git-commit-setup-hook '(git-commit-turn-on-flyspell - my/git-commit-maybe-set-fill-column))) + git-commit-setup-hook + '(git-commit-turn-on-flyspell + my/git-commit-maybe-set-fill-column + my/git-commit-maybe-set-changelog-support) + '(git-commit-setup-changelog-support))) (use-package gnus :custom