summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2012-04-20 11:16:33 +0200
committerNicolas Goaziou <n.goaziou@gmail.com>2012-04-20 11:16:33 +0200
commitd17761a05a514037751cae34ef8bedd204b19db9 (patch)
tree82e3e981297c5c7187bb12095adc6bc9cfeca2dc
parentdbc6fd1ebf5ca6a17f30d205c0d5db2f608d966e (diff)
parent8b18c50d4cfc78072c6306709976fa2b19ef6044 (diff)
downloadorg-mode-d17761a05a514037751cae34ef8bedd204b19db9.tar.gz
Merge branch 'hotfix'
-rw-r--r--lisp/org-footnote.el13
1 files changed, 10 insertions, 3 deletions
diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el
index a798796..2997964 100644
--- a/lisp/org-footnote.el
+++ b/lisp/org-footnote.el
@@ -715,8 +715,8 @@ Additional note on `org-footnote-insert-pos-for-preprocessor':
((and org-footnote-section (eq major-mode 'org-mode))
(goto-char (point-min))
(if (re-search-forward
- (concat "^\\*[ \t]+" (regexp-quote org-footnote-section)
- "[ \t]*$") nil t)
+ (concat "^\\*[ \t]+" (regexp-quote org-footnote-section)
+ "[ \t]*$") nil t)
(delete-region (match-beginning 0) (org-end-of-subtree t t)))
;; A new footnote section is inserted by default at the end of
;; the buffer.
@@ -726,7 +726,14 @@ Additional note on `org-footnote-insert-pos-for-preprocessor':
(unless (bolp) (newline)))
;; No footnote section set: Footnotes will be added at the end
;; of the section containing their first reference.
- ((eq major-mode 'org-mode))
+ ;; Nevertheless, in an export situation, set insertion point to
+ ;; `point-max' by default.
+ ((eq major-mode 'org-mode)
+ (when export-props
+ (goto-char (point-max))
+ (skip-chars-backward " \r\t\n")
+ (forward-line)
+ (delete-region (point) (point-max))))
(t
;; Remove any left-over tag in the buffer, if one is set up.
(when org-footnote-tag-for-non-org-mode-files