Explorar o código

Merge branch 'hotfix-7.8.06'

Nicolas Goaziou %!s(int64=13) %!d(string=hai) anos
pai
achega
6427c6aeaa
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      lisp/org-footnote.el

+ 3 - 2
lisp/org-footnote.el

@@ -865,8 +865,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)