org-footnote: Fix LaTeX export error when a src block produces fake footnotes

* lisp/org-footnote.el (org-footnote-delete-definitions): Fix LaTeX
  export error when a src block produces fake footnotes.
This commit is contained in:
Nicolas Goaziou 2012-03-24 20:34:41 +01:00
parent ec65badbaa
commit 6ad53828cc
1 changed files with 3 additions and 2 deletions

View File

@ -864,8 +864,9 @@ Return the number of footnotes removed."
(ndef 0))
(while (re-search-forward def-re nil t)
(let ((full-def (org-footnote-at-definition-p)))
(delete-region (nth 1 full-def) (nth 2 full-def)))
(incf ndef))
(when full-def
(delete-region (nth 1 full-def) (nth 2 full-def))
(incf ndef))))
ndef)))
(defun org-footnote-delete (&optional label)