]> git.eshelyaron.com Git - emacs.git/commitdiff
* autorevert.el (auto-revert-handler): Ensure, that
authorMichael Albinus <michael.albinus@gmx.de>
Sun, 11 Mar 2012 17:58:16 +0000 (18:58 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Sun, 11 Mar 2012 17:58:16 +0000 (18:58 +0100)
file-readable-p is applied only for local files or in
auto-revert-tail-mode.

lisp/ChangeLog
lisp/autorevert.el

index 0e2a791f0e90363c74e63cee867cec6c4a44cad3..c11c60bdd6d66828d066dcb7c83c8ad449d1ed77 100644 (file)
@@ -1,3 +1,9 @@
+2012-03-11  Michael Albinus  <michael.albinus@gmx.de>
+
+       * autorevert.el (auto-revert-handler): Ensure, that
+       file-readable-p is applied only for local files or in
+       auto-revert-tail-mode.
+
 2012-03-11  Andreas Schwab  <schwab@linux-m68k.org>
 
        * server.el (server-eval-at): Handle non-tcp connections.  Decode
index c0a77bd59358797e3de11d54eb841d3fa5b2a63e..40cf79a64284a78f8eed7032b063ac378b0f7c4c 100644 (file)
@@ -439,17 +439,18 @@ This is an internal function used by Auto-Revert Mode."
     (let* ((buffer (current-buffer)) size
           (revert
            (or (and buffer-file-name
-                    (file-readable-p buffer-file-name)
                     (if auto-revert-tail-mode
                         ;; Tramp caches the file attributes.  Setting
                         ;; `remote-file-name-inhibit-cache' forces Tramp
                         ;; to reread the values.
                         (let ((remote-file-name-inhibit-cache t))
+                          (file-readable-p buffer-file-name)
                           (/= auto-revert-tail-pos
                               (setq size
                                     (nth 7 (file-attributes
                                             buffer-file-name)))))
                       (and (not (file-remote-p buffer-file-name))
+                           (file-readable-p buffer-file-name)
                            (not (verify-visited-file-modtime buffer)))))
                (and (or auto-revert-mode
                         global-auto-revert-non-file-buffers)