From: ueno Date: Thu, 17 Feb 2000 20:56:07 +0000 (+0000) Subject: (remove-images): Rewrite. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=64ef4a452996528be5323bf67cde48bc214ecb63;p=elisp%2Fapel.git (remove-images): Rewrite. --- diff --git a/image-bm.el b/image-bm.el index bd321f3..fc22bb5 100644 --- a/image-bm.el +++ b/image-bm.el @@ -81,7 +81,15 @@ means display it in the right marginal area. "Remove images between START and END in BUFFER. Remove only images that were put in BUFFER with calls to `put-image'. BUFFER nil or omitted means use the current buffer. -\[Emacs 21 emulating function]") +\[Emacs 21 emulating function]" + (save-restriction + (narrow-to-region start end) + (goto-char (point-min)) + (while (setq start (next-single-property-change (point) 'pimage-bitmap)) + (when (get-text-property start 'pimage-bitmap) + (delete-region start (next-single-property-change + start 'pimage-bitmap nil end)) + (goto-char start))))) (defmacro-maybe defimage (symbol specs &optional doc) "Define SYMBOL as an image.