From 78a1d2919ce63201ce3c352741b7161522135922 Mon Sep 17 00:00:00 2001 From: Jambunathan K Date: Mon, 10 Oct 2011 14:27:14 +0530 Subject: [PATCH] org-odt.el: Abort export if the label referenced is not defined * contrib/lisp/org-odt.el (org-odt-get-label-definition): Throw an error if the label that is being referenced is not defined elsewhere. --- contrib/lisp/org-odt.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/lisp/org-odt.el b/contrib/lisp/org-odt.el index 55271d8ec..fcb1ff672 100644 --- a/contrib/lisp/org-odt.el +++ b/contrib/lisp/org-odt.el @@ -1647,6 +1647,8 @@ See `org-odt-entity-labels-alist' and `org-odt-label-def-ref-spec'." (let* ((label-props (assoc label org-odt-entity-labels-alist)) (category (nth 1 label-props))) + (unless label-props + (error "There is no entity labelled as %s" label)) (append label-props (cddr (or (assoc-string category org-odt-label-def-ref-spec t) (assoc-string "" org-odt-label-def-ref-spec t)))))) -- 2.11.4.GIT