]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix thinko in previous footnote.el change
authorLars Ingebrigtsen <larsi@gnus.org>
Thu, 21 Jan 2021 11:45:24 +0000 (12:45 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Thu, 21 Jan 2021 11:45:29 +0000 (12:45 +0100)
* lisp/mail/footnote.el (footnote--regenerate-alist): Don't error
out when there's no footnotes.

lisp/mail/footnote.el

index 9c1a738035e713463eaae79536d28c20e45d7b17..995ae5f9160f54a6d22abab0ca333cb266450dcb 100644 (file)
@@ -916,8 +916,7 @@ play around with the following keys:
 (defun footnote--regenerate-alist ()
   (save-excursion
     (goto-char (point-min))
-    (if (not (re-search-forward footnote-section-tag-regexp nil t))
-        (error "No footnote section in this buffer")
+    (when (re-search-forward footnote-section-tag-regexp nil t)
       (setq footnote--markers-alist
             (cl-loop
              with start-of-footnotes = (match-beginning 0)