summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2011-09-28 19:07:38 +0200
committerNicolas Goaziou <n.goaziou@gmail.com>2011-09-28 19:07:38 +0200
commit774f9cb8e63f9739207581b81710c8b6b8cf4d01 (patch)
tree5ef95a785bc5d0fd98b129adf39c4b053b73a3d8
parent15c3e180b231767e1526c2cd37ac503ac67ff156 (diff)
downloadorg-mode-774f9cb8e63f9739207581b81710c8b6b8cf4d01.tar.gz
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.
-rw-r--r--lisp/org-footnote.el1
1 files changed, 1 insertions, 0 deletions
diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el
index fef88c1..cce0921 100644
--- a/lisp/org-footnote.el
+++ b/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