]> git.eshelyaron.com Git - emacs.git/commitdiff
(image-toggle-display): Let-bind `buffer-file-truename' to nil around the
authorJuri Linkov <juri@jurta.org>
Thu, 12 Feb 2009 21:49:29 +0000 (21:49 +0000)
committerJuri Linkov <juri@jurta.org>
Thu, 12 Feb 2009 21:49:29 +0000 (21:49 +0000)
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)

lisp/ChangeLog
lisp/image-mode.el

index 041c0dd59eabf69fbd3ec7de88bfcc4cddfe7f95..a0533e6558b8d39fa3352c28c1f2ad41625caf2e 100644 (file)
@@ -1,3 +1,11 @@
+2009-02-12  Juri Linkov  <juri@jurta.org>
+
+       * image-mode.el (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)
+
 2009-02-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * progmodes/python.el (python-use-skeletons): Re-add.
index a5298d8eaa7dafa2ca3d18796d77d285b1c56c5b..b751652267045cc98dd94b67ffeb313750379fe3 100644 (file)
@@ -457,8 +457,9 @@ and showing the image as an image."
           (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)