1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-25 07:27:57 +00:00

footnote: Improve last commit

* lisp/org-footnote.el (org-footnote--allow-reference-p): Improve last
commit.
This commit is contained in:
Nicolas Goaziou 2021-10-06 14:41:50 +02:00
parent 5f6e199143
commit 94b410b32c

View File

@ -281,10 +281,10 @@ otherwise."
(save-excursion (goto-char (org-element-property :end context))
(skip-chars-backward " \r\t\n")
(if (eq (org-element-class context) 'object) (point)
(1+ (line-beginning-position 2))))))
(line-beginning-position 2)))))
;; At the beginning of a footnote definition, right after the
;; label, is OK.
((eq type 'footnote-definition) (looking-at (rx (or space buffer-end))))
((eq type 'footnote-definition) (looking-at (rx space)))
;; Other elements are invalid.
((eq (org-element-class context) 'element) nil)
;; Just before object is fine.