Forráskód Böngészése

org-footnote: ensure footnote tag is inserted after footnotes in non-Org buffers

* lisp/org-footnote.el (org-footnote-create-definition): When the tag
  is missing, it is created before any existing footnote, or at end of
  buffer.  In the latter case, the marker pointing at the position
  where the new footnote is going to be inserted (at end of buffer)
  stays before the tag.  This patch makes sure that the marker will be
  kept after the tag.
Nicolas Goaziou 13 éve
szülő
commit
774f9cb8e6
1 módosított fájl, 1 hozzáadás és 0 törlés
  1. 1 0
      lisp/org-footnote.el

+ 1 - 0
lisp/org-footnote.el

@@ -522,6 +522,7 @@ or new, let the user edit the definition of the footnote."
 		       (open-line 2)
 		       (open-line 2)
 		       (point-marker))
 		       (point-marker))
 		   (point-max-marker))))
 		   (point-max-marker))))
+	(set-marker-insertion-type max t)
 	(goto-char max)
 	(goto-char max)
 	;; Check if the footnote tag is defined but missing.  In this
 	;; Check if the footnote tag is defined but missing.  In this
 	;; case, insert it, before any footnote or one blank line
 	;; case, insert it, before any footnote or one blank line