]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve filling with footnote-mode
authorStefan Kangas <stefankangas@gmail.com>
Sun, 9 Feb 2025 14:34:41 +0000 (15:34 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sun, 9 Feb 2025 14:53:57 +0000 (15:53 +0100)
* lisp/mail/footnote.el (footnote-mode): Add regexp for footnotes
to sentence-end-base to improve filling.

(cherry picked from commit 64905eba2707f89c3befe99b36d14e24eeb9f8c0)

lisp/mail/footnote.el

index c4d10b7485627b205a40a117b2c58d6f888b32d4..1e6265c79bfd85b7bb89c9f1c43f7e44716bd514 100644 (file)
@@ -894,6 +894,10 @@ play around with the following keys:
     (make-local-variable 'footnote-start-tag)
     (make-local-variable 'footnote-end-tag)
     (make-local-variable 'adaptive-fill-function)
+    (setq-local sentence-end-base
+                (rx (or (regexp sentence-end-base)
+                        (seq (regexp sentence-end-base)
+                             "[" (+ digit) "]"))))
 
     ;; Filladapt is a GNU ELPA package.
     (when (boundp 'filladapt-token-table)