1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-29 07:58:21 +00:00

Fix "org-remove-if: Wrong type argument: number-or-marker-p, nil"

* lisp/org.el (org-remove-latex-fragment-image-overlays): Remove
  overlays not associated to a buffer.

Reported-by: Rainer M Krug <Rainer@krugs.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/101645>
This commit is contained in:
Nicolas Goaziou 2015-10-01 21:42:15 +02:00
parent 7273473e6b
commit 919d0cdb76

View File

@ -18980,10 +18980,12 @@ removed, nil otherwise."
(end (or end (point-max))))
(org-remove-if
(lambda (o)
(and (>= (overlay-start o) beg)
(<= (overlay-end o) end)
(progn (delete-overlay o)
(or removedp (setq removedp t)))))
(cond ((not (overlay-buffer o)) (delete-overlay o) t)
((and (>= (overlay-start o) beg)
(<= (overlay-end o) end))
(delete-overlay o)
(unless removedp (setq removedp t)))
(t nil)))
org-latex-fragment-image-overlays)))
removedp))