org-footnote: Update library wrt new footnote syntax
commit8eb318f2d0ae3840d14d9b0985853b11bfe27995
authorNicolas Goaziou <mail@nicolasgoaziou.fr>
Wed, 16 Dec 2015 17:38:53 +0000 (16 18:38 +0100)
committerNicolas Goaziou <mail@nicolasgoaziou.fr>
Tue, 22 Dec 2015 15:55:17 +0000 (22 16:55 +0100)
treeb84efc135f7fb8aa9e5b24c01f11af8abefcddc7
parentdeafe565548992fb56a4fe7d613996fcd18d038f
org-footnote: Update library wrt new footnote syntax

* lisp/org-footnote.el (org-footnote-re):
(org-footnote-definition-re): Do not match [1]-like constructs.

(org-footnote): Fix typo.

(org-footnote-auto-label): Do not offer to create [1]-like constructs
anymore.

(org-footnote-new): Remove reference to obsolete value in
`org-footnote-auto-label'.

(org-footnote-at-reference-p):
(org-footnote-get-next-reference):
(org-footnote-next-reference-or-definition):
(org-footnote-goto-definition):
(org-footnote-goto-previous-reference): Use new regexp.

(org-footnote-normalize-label): Remove "fn:" prefix instead of adding
it.

(org-footnote-get-definition):
(org-footnote-all-labels):
(org-footnote-unique-label): Small refactoring.

(org-footnote-create-definition):
(org-footnote-delete-definitions):

(org-footnote--clear-footnote-section):
(org-footnote--collect-references):
(org-footnote--collect-definitions):
(org-footnote--set-label):
(org-footnote-sort): New functions.

(org-footnote-auto-adjust-maybe):
(org-footnote-action): Use new functions.  Small refactoring.

(org-footnote-renumber-fn:N): Refactor code.  Handle nested footnotes.

(org-footnote-normalize): Turn footnotes into [fn:N] construct instead
of [N].
* testing/lisp/test-org-footnote.el (test-org-footnote/delete):

(test-org-footnote/goto-definition):
(test-org-footnote/normalize): Update test

(test-org-footnote/sort):
(test-org-footnote/renumber-fn:N): New tests.

(test-org-footnote/normalize-outside-org): Remove test.
lisp/org-footnote.el
testing/lisp/test-org-footnote.el