瀏覽代碼

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 年之前
父節點
當前提交
774f9cb8e6
共有 1 個文件被更改,包括 1 次插入0 次删除
  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)
 		       (point-marker))
 		   (point-max-marker))))
+	(set-marker-insertion-type max t)
 	(goto-char max)
 	;; Check if the footnote tag is defined but missing.  In this
 	;; case, insert it, before any footnote or one blank line