0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-07-16 20:16:26 +00:00

Merge branch 'maint'

This commit is contained in:
Nicolas Goaziou 2012-02-02 21:26:21 +01:00
commit e30e13b8c7

View file

@ -547,7 +547,9 @@ or new, let the user edit the definition of the footnote."
(unless (bolp) (newline)) (unless (bolp) (newline))
(set-marker max nil)))) (set-marker max nil))))
;; Insert footnote label. ;; Insert footnote label.
(insert "\n[" label "] ") (when (zerop (org-back-over-empty-lines)) (newline))
(insert "[" label "] \n")
(backward-char)
;; Only notify user about next possible action when in an Org ;; Only notify user about next possible action when in an Org
;; buffer, as the bindings may have different meanings otherwise. ;; buffer, as the bindings may have different meanings otherwise.
(when (eq major-mode 'org-mode) (when (eq major-mode 'org-mode)
@ -713,10 +715,12 @@ Additional note on `org-footnote-insert-pos-for-preprocessor':
(if (re-search-forward (if (re-search-forward
(concat "^\\*[ \t]+" (regexp-quote org-footnote-section) (concat "^\\*[ \t]+" (regexp-quote org-footnote-section)
"[ \t]*$") nil t) "[ \t]*$") nil t)
(delete-region (match-beginning 0) (org-end-of-subtree t))) (delete-region (match-beginning 0) (org-end-of-subtree t t)))
;; A new footnote section is inserted by default at the end of ;; A new footnote section is inserted by default at the end of
;; the buffer. ;; the buffer.
(goto-char (point-max)) (goto-char (point-max))
(skip-chars-backward " \r\t\n")
(forward-line)
(unless (bolp) (newline))) (unless (bolp) (newline)))
;; No footnote section set: Footnotes will be added before next ;; No footnote section set: Footnotes will be added before next
;; headline. ;; headline.