summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2012-09-02 20:56:22 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2012-09-02 20:56:22 +0200
commitcfed599a48b36b412a08b08df96fee230b58c06b (patch)
tree7ac8890cdfc1de0c8b52c0be0918fc5153114d56 /elisp
parent8f2e4ba17b704965f3a35d1d0a312dec31800862 (diff)
downloadgeiser-chez-cfed599a48b36b412a08b08df96fee230b58c06b.tar.gz
geiser-chez-cfed599a48b36b412a08b08df96fee230b58c06b.tar.bz2
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.
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-image.el4
1 files changed, 2 insertions, 2 deletions
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))