diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2011-09-29 15:20:34 +0200 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2011-09-29 15:20:34 +0200 |
commit | c7abf641ebb30bfa5761b9b175fe6976402ab9d2 (patch) | |
tree | d70569eb2c20feb1a36243ff212ecf76b4df34c2 | |
parent | dec0b8e975ca97e319ec946979d188b13cff0f41 (diff) | |
download | org-mode-c7abf641ebb30bfa5761b9b175fe6976402ab9d2.tar.gz |
org-footnote: fix commit 774f9cb8e63f9739207581b81710c8b6b8cf4d01
* lisp/org-footnote.el (org-footnote-create-definition): Explicitely
move point after tag, if it has just been inserted.
-rw-r--r-- | lisp/org-footnote.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el index cce0921..1cad895 100644 --- a/lisp/org-footnote.el +++ b/lisp/org-footnote.el @@ -527,13 +527,13 @@ or new, let the user edit the definition of the footnote." ;; Check if the footnote tag is defined but missing. In this ;; case, insert it, before any footnote or one blank line ;; after any previous text. - (save-excursion - (when (and tag (not (re-search-backward tag nil t))) - (skip-chars-backward " \t\r\n") - (while (re-search-backward org-footnote-definition-re nil t)) - (unless (bolp) (newline 2)) - (insert org-footnote-tag-for-non-org-mode-files "\n\n"))) + (when (and tag (not (re-search-backward tag nil t))) + (skip-chars-backward " \t\r\n") + (while (re-search-backward org-footnote-definition-re nil t)) + (unless (bolp) (newline 2)) + (insert org-footnote-tag-for-non-org-mode-files "\n\n")) ;; Remove superfluous white space and clear marker. + (goto-char max) (skip-chars-backward " \t\r\n") (delete-region (point) max) (unless (bolp) (newline)) |