emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/image-mode.el


From: Chong Yidong
Subject: [Emacs-diffs] Changes to emacs/lisp/image-mode.el
Date: Mon, 30 Jan 2006 20:44:46 +0000

Index: emacs/lisp/image-mode.el
diff -u emacs/lisp/image-mode.el:1.7 emacs/lisp/image-mode.el:1.8
--- emacs/lisp/image-mode.el:1.7        Sun Sep 18 12:25:02 2005
+++ emacs/lisp/image-mode.el    Mon Jan 30 20:44:44 2006
@@ -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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]