summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Lundin <mdl@imapmail.org>2011-03-11 18:49:06 +0000
committerBastien Guerry <bzg@altern.org>2011-03-17 09:24:30 +0100
commit2444744985e14cefae8f28bdde88bc5fb438f085 (patch)
tree2a66c0fbf125426ace948c5a8e01614f2fd21952
parent51244d53442a34be577121e3d716b1610e039e1f (diff)
downloadorg-mode-2444744985e14cefae8f28bdde88bc5fb438f085.tar.gz
Prevent creation of duplicate footnote sections.
* lisp/org-footnote.el: (org-footnote-create-definition): Allow for footnote sections above the current footnote insertion point. Fixes bug in which org-mode will create a new footnote section if the current footnote section is not beneath the current insertion point.
-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 0524b41..2ce6668 100644
--- a/lisp/org-footnote.el
+++ b/lisp/org-footnote.el
@@ -291,6 +291,7 @@ or new, let the user edit the definition of the footnote."
;; No section, put footnote into the current outline node
nil
;; Try to find or make the special node
+ (goto-char (point-min))
(setq re (concat "^\\*+[ \t]+" org-footnote-section "[ \t]*$"))
(unless (or (re-search-forward re nil t)
(and (progn (widen) t)