Mercurial > emacs
diff lisp/image-mode.el @ 83463:38c49afb29d9
Merged from
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-31
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-503
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Wed, 01 Feb 2006 02:04:15 +0000 |
parents | 1239e70c4e3c |
children | 3bd95f4f2941 |
line wrap: on
line diff
--- a/lisp/image-mode.el Mon Jan 30 20:00:11 2006 +0000 +++ b/lisp/image-mode.el Wed Feb 01 02:04:15 2006 +0000 @@ -137,11 +137,14 @@ (message "Repeat this command to go back to displaying the image"))) ;; Turn the image data into a real image, but only if the whole file ;; was inserted - (let* ((data - (string-make-unibyte - (buffer-substring-no-properties (point-min) (point-max)))) - (image - (create-image data nil t)) + (let* ((image + (if (and (buffer-file-name) + (not (buffer-modified-p))) + (create-image (buffer-file-name)) + (create-image + (string-make-unibyte + (buffer-substring-no-properties (point-min) (point-max))) + nil t))) (props `(display ,image intangible ,image