From 123d5fcd4f4594c04210ab873395e7def8790450 Mon Sep 17 00:00:00 2001 From: Aaron Ecay Date: Sat, 27 Sep 2014 23:57:01 -0400 Subject: [PATCH 2/2] [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. --- lisp/ox.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/ox.el b/lisp/ox.el index 216a375..2516a22 100644 --- a/lisp/ox.el +++ b/lisp/ox.el @@ -3711,12 +3711,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. -- 2.1.1