changeset 68749:c0b14a7a6a49

* image-mode.el (image-toggle-display): Clear image cache if using filename.
author Chong Yidong <cyd@stupidchicken.com>
date Thu, 09 Feb 2006 19:34:08 +0000
parents 51fd7d4e1d8a
children 475285e9bca9
files lisp/ChangeLog lisp/image-mode.el
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Feb 09 19:20:46 2006 +0000
+++ b/lisp/ChangeLog	Thu Feb 09 19:34:08 2006 +0000
@@ -1,3 +1,8 @@
+2006-02-09  Chong Yidong  <cyd@stupidchicken.com>
+
+	* image-mode.el (image-toggle-display): Clear image cache if using
+	filename.
+
 2006-02-09 Masatake YAMATO  <jet@gyve.org>
 
 	* dired-x.el (dired-guess-shell-alist-default): Add .man as
--- a/lisp/image-mode.el	Thu Feb 09 19:20:46 2006 +0000
+++ b/lisp/image-mode.el	Thu Feb 09 19:34:08 2006 +0000
@@ -140,7 +140,8 @@
     (let* ((image
 	    (if (and (buffer-file-name)
 		     (not (buffer-modified-p)))
-		(create-image (buffer-file-name))
+		(progn (clear-image-cache)
+		       (create-image (buffer-file-name)))
 	      (create-image
 	       (string-make-unibyte
 		(buffer-substring-no-properties (point-min) (point-max)))