summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2012-03-03 13:00:46 +0100
committerNicolas Goaziou <n.goaziou@gmail.com>2012-03-03 13:00:46 +0100
commitc8020dd42e8b7d8d433948bacd1ac2b03fed2dc2 (patch)
tree3623056a221185716cb1db39887fa67717131511
parent6b91eb9e657ab0a91c2df6d0081b302af20f083a (diff)
downloadorg-mode-c8020dd42e8b7d8d433948bacd1ac2b03fed2dc2.tar.gz
org-footnote: Clean-up `org-footnote-normalize'
* lisp/org-footnote.el (org-footnote-normalize): Remove an useless part of the function. (org-insert-footnote-reference-near-definition): Remove function.
-rw-r--r--lisp/org-footnote.el21
1 files changed, 2 insertions, 19 deletions
diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el
index 71c0101..9325d17 100644
--- a/lisp/org-footnote.el
+++ b/lisp/org-footnote.el
@@ -817,7 +817,7 @@ Additional note on `org-footnote-insert-pos-for-preprocessor':
(when export-props (setq org-export-footnotes-seen ref-table)))
;; Each footnote definition has to be inserted at the end of
;; the section where its first reference belongs.
- ((not sort-only)
+ (t
(mapc
(lambda (x)
(let ((pos (nth 4 x)))
@@ -826,24 +826,7 @@ Additional note on `org-footnote-insert-pos-for-preprocessor':
(set-marker pos nil))
(org-footnote-goto-local-insertion-point)
(insert (format "\n[%s] %s\n" (nth 1 x) (nth 2 x))))
- ref-table))
- ;; Else, insert each definition at the end of the section
- ;; containing their first reference. Happens only in Org files
- ;; with no special footnote section, and only when doing
- ;; sorting.
- (t (mapc 'org-insert-footnote-reference-near-definition
- ref-table))))))
-
-(defun org-insert-footnote-reference-near-definition (entry)
- "Find first reference of footnote ENTRY and insert the definition there.
-ENTRY is (fn-label num-mark definition)."
- (when (car entry)
- (goto-char (point-min))
- (let ((ref (org-footnote-get-next-reference (car entry))))
- (when ref
- (goto-char (nth 2 ref))
- (org-footnote-goto-local-insertion-point)
- (insert (format "\n[%s] %s\n" (car entry) (nth 2 entry)))))))
+ ref-table))))))
(defun org-footnote-goto-local-insertion-point ()
"Find insertion point for footnote, just before next outline heading."