1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-25 07:27:57 +00:00

[export] Raise an error if footnote definition is not found.

* lisp/ox.el (org-export-get-footnote-definition): Raise an error if
footnote definition is not found.
This commit is contained in:
Aaron Ecay 2014-09-27 23:57:01 -04:00
parent 5f423f1208
commit bc9a582f1e

View File

@ -3825,12 +3825,12 @@ INFO is the plist used as a communication channel."
(defun org-export-get-footnote-definition (footnote-reference info)
"Return definition of FOOTNOTE-REFERENCE as parsed data.
INFO is the plist used as a communication channel. If no such
definition can be found, return \"DEFINITION NOT FOUND\"."
definition can be found, raise an error."
(let ((label (org-element-property :label footnote-reference)))
(or (if label
(cdr (assoc label (plist-get info :footnote-definition-alist)))
(org-element-contents footnote-reference))
"DEFINITION NOT FOUND.")))
(error "Definition not found for footnote %s" label))))
(defun org-export-get-footnote-number (footnote info)
"Return number associated to a footnote.