From 64ef4a452996528be5323bf67cde48bc214ecb63 Mon Sep 17 00:00:00 2001 From: ueno Date: Thu, 17 Feb 2000 20:56:07 +0000 Subject: [PATCH] (remove-images): Rewrite. --- image-bm.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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. -- 1.7.10.4