oni-git-commit: Add ‘-’ as paragraph separator
This commit is contained in:
parent
71882f577b
commit
56076c28e1
1 changed files with 9 additions and 1 deletions
|
@ -4,7 +4,7 @@
|
|||
|
||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||
;; Keywords: local
|
||||
;; Version: 2025.0130.100352
|
||||
;; Version: 2025.0130.104837
|
||||
;; Package-Requires: (git-commit)
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
|
@ -44,7 +44,15 @@
|
|||
"Set the ‘auto-fill-inhibit-regexp’ to match git commit comments."
|
||||
(setq-local auto-fill-inhibit-regexp (rx (minimal-match (zero-or-more "\n")) "#")))
|
||||
|
||||
(defun oni-git-commit-set-paragraph-start ()
|
||||
"Set the ‘paragraph-start’ variable locally."
|
||||
(setq-local paragraph-start
|
||||
(rx (or ""
|
||||
(seq (zero-or-more whitespace) eol)
|
||||
(any "*" "-" "(")))))
|
||||
|
||||
(add-hook 'git-commit-mode-hook #'oni-git-commit-set-auto-fill-inhibit-regexp)
|
||||
(add-hook 'git-commit-mode-hook #'oni-git-commit-set-paragraph-start)
|
||||
(add-hook 'git-commit-mode-hook 'electric-pair-local-mode)
|
||||
(add-hook 'git-commit-mode-hook 'electric-quote-local-mode)
|
||||
(add-hook 'git-commit-mode-hook 'refill-mode)
|
||||
|
|
Loading…
Reference in a new issue