# HG changeset patch # User Juri Linkov # Date 1234475335 0 # Node ID aab85e9d78b616d55910c88dc808878a84d80cb7 # Parent 82f3d6b4d8c13f1f208163c89107a076ba938c24 (image-toggle-display): Let-bind `buffer-file-truename' to nil around the call to `add-text-properties' to prevent directory time modification by lock_file. Replace `set-buffer-modified-p' with `restore-buffer-modified-p'. (Bug#2295) diff -r 82f3d6b4d8c1 -r aab85e9d78b6 lisp/image-mode.el --- a/lisp/image-mode.el Thu Feb 12 18:20:52 2009 +0000 +++ b/lisp/image-mode.el Thu Feb 12 21:48:55 2009 +0000 @@ -457,8 +457,9 @@ (buffer-undo-list t) (modified (buffer-modified-p))) (image-refresh image) - (add-text-properties (point-min) (point-max) props) - (set-buffer-modified-p modified) + (let ((buffer-file-truename nil)) ; avoid changing dir mtime by lock_file + (add-text-properties (point-min) (point-max) props) + (restore-buffer-modified-p modified)) ;; Inhibit the cursor when the buffer contains only an image, ;; because cursors look very strange on top of images. (setq cursor-type nil)