From c8020dd42e8b7d8d433948bacd1ac2b03fed2dc2 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sat, 3 Mar 2012 13:00:46 +0100 Subject: [PATCH] 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. --- lisp/org-footnote.el | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el index 71c010148..9325d1767 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." -- 2.11.4.GIT