]> code.delx.au - gnu-emacs/blobdiff - lisp/image-mode.el
(mac-text-encoding-ascii): New constant.
[gnu-emacs] / lisp / image-mode.el
index 3c0544edf8984253f5f240d612314f158b64acb2..66d7fb6c16a04a7679059bc148c28072986c749d 100644 (file)
@@ -1,6 +1,6 @@
 ;;; image-mode.el --- support for visiting image files
 ;;
-;; Copyright (C) 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2005, 2006 Free Software Foundation, Inc.
 ;;
 ;; Author: Richard Stallman <rms@gnu.org>
 ;; Keywords: multimedia
@@ -139,8 +139,14 @@ and showing the image as an image."
     ;; was inserted
     (let* ((image
            (if (and (buffer-file-name)
-                    (not (buffer-modified-p)))
-               (create-image (buffer-file-name))
+                    (not (file-remote-p (buffer-file-name)))
+                    (not (buffer-modified-p))
+                    (not (and (boundp 'archive-superior-buffer)
+                              archive-superior-buffer))
+                    (not (and (boundp 'tar-superior-buffer)
+                              tar-superior-buffer)))
+               (progn (clear-image-cache)
+                      (create-image (buffer-file-name)))
              (create-image
               (string-make-unibyte
                (buffer-substring-no-properties (point-min) (point-max)))