From: Michael Albinus Date: Mon, 26 Aug 2013 06:59:53 +0000 (+0200) Subject: * net/tramp-sh.el (tramp-sh-handle-verify-visited-file-modtime): X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1686^2~121 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=df54bcbde0e7f8762b97a0e9ea2021e1902851e6;p=emacs.git * net/tramp-sh.el (tramp-sh-handle-verify-visited-file-modtime): BUF can be optional. (Bug#15186) --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 09bd7d19c2a..636e09cbe73 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-08-26 Michael Albinus + + * net/tramp-sh.el (tramp-sh-handle-verify-visited-file-modtime): + BUF can be optional. (Bug#15186) + 2013-08-25 Xue Fuqiao * progmodes/flymake.el (flymake-get-real-file-name-function): diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index e41ed36f597..b76ac2fa11f 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -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