diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2012-09-02 20:56:22 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2012-09-02 20:56:22 +0200 |
commit | 0c301d52faa33423cd27b64638667bbe338e5fbb (patch) | |
tree | e0e1e38a57ddd7b271bd92ac55bc30991cc76c53 /elisp | |
parent | bc9f7f7db6570a07b991cb3cf3f7aee71523d509 (diff) | |
download | geiser-0c301d52faa33423cd27b64638667bbe338e5fbb.tar.gz geiser-0c301d52faa33423cd27b64638667bbe338e5fbb.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.el | 4 |
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)) |