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.
This commit is contained in:
Jambunathan K 2011-10-10 14:27:14 +05:30
parent bbf836730a
commit 78a1d2919c
1 changed files with 2 additions and 0 deletions

View File

@ -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))))))