From cfed599a48b36b412a08b08df96fee230b58c06b Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sun, 2 Sep 2012 20:56:22 +0200 Subject: Elisp: insert instead of put images Images rendered via put-image won't be deleted by erase-buffer (they're overlays), while those inserted by insert-image (text properties) will. --- elisp/geiser-image.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'elisp') diff --git a/elisp/geiser-image.el b/elisp/geiser-image.el index f194e04..3769c4c 100644 --- a/elisp/geiser-image.el +++ b/elisp/geiser-image.el @@ -96,9 +96,9 @@ images in `geiser-image-cache-dir'." (begin (match-beginning 0)) (end (match-end 0))) (delete-region begin end) + (goto-char begin) (if (and inline-images-p (display-images-p)) - (put-image (create-image file) begin "[image]") - (goto-char begin) + (insert-image (create-image file) "[image]") (geiser-image--insert-button file) (when auto-p (geiser-image--display file))) (setq geiser-image-cache-dir (file-name-directory file)) -- cgit v1.2.3