]> git.eshelyaron.com Git - emacs.git/commitdiff
* net/tramp-sh.el (tramp-sh-handle-verify-visited-file-modtime):
authorMichael Albinus <michael.albinus@gmx.de>
Mon, 26 Aug 2013 06:59:53 +0000 (08:59 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Mon, 26 Aug 2013 06:59:53 +0000 (08:59 +0200)
BUF can be optional.  (Bug#15186)

lisp/ChangeLog
lisp/net/tramp-sh.el

index 09bd7d19c2ae19b0faee93e675f28725a6c2a2ff..636e09cbe734551b35b22c7dee7943d9c8fdeddb 100644 (file)
@@ -1,3 +1,8 @@
+2013-08-26  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp-sh.el (tramp-sh-handle-verify-visited-file-modtime):
+       BUF can be optional.  (Bug#15186)
+
 2013-08-25  Xue Fuqiao  <xfq.free@gmail.com>
 
        * progmodes/flymake.el (flymake-get-real-file-name-function):
index e41ed36f59798eea83503821abffc19e92489d24..b76ac2fa11f1ad8eed692ca7aa7f4b2b3b539420 100644 (file)
@@ -1234,14 +1234,14 @@ target of the symlink differ."
 
 ;; This function makes the same assumption as
 ;; `tramp-sh-handle-set-visited-file-modtime'.
-(defun tramp-sh-handle-verify-visited-file-modtime (buf)
+(defun tramp-sh-handle-verify-visited-file-modtime (&optional buf)
   "Like `verify-visited-file-modtime' for Tramp files.
 At the time `verify-visited-file-modtime' calls this function, we
 already know that the buffer is visiting a file and that
 `visited-file-modtime' does not return 0.  Do not call this
 function directly, unless those two cases are already taken care
 of."
-  (with-current-buffer buf
+  (with-current-buffer (or buf (current-buffer))
     (let ((f (buffer-file-name)))
       ;; There is no file visiting the buffer, or the buffer has no
       ;; recorded last modification time, or there is no established