bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#27777: Footnotes: only allow creation when in text body [Code includ


From: Boruch Baum
Subject: bug#27777: Footnotes: only allow creation when in text body [Code included]
Date: Thu, 20 Jul 2017 17:40:02 -0400
User-agent: Mutt/1.5.23 (2014-03-12)

I'm experiencing a bug in that emacs is allowing me to add a footnote
when I am already in the footnote region. In that case, emacs blithely
adds a footnote text marker at point within the footnote region. Of
course, it also then adds a footnote reference marker.

Here's my fix, for your consideration.

#+BEGIN_SRC emacs-lisp
(defadvice Footnote-add-footnote (around abort-when-in-fn-area activate)
  (interactive)
  (if (or
        (not footnote-text-marker-alist)
        (< (point) (cdr (first footnote-text-marker-alist))))
    ad-do-it
   (message "Add footnotes only while in text body")))
#+END_SRC


--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0





reply via email to

[Prev in Thread] Current Thread [Next in Thread]