emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r114002: * net/tramp-sh.el (tramp-sh-handle-verify-v


From: Michael Albinus
Subject: [Emacs-diffs] trunk r114002: * net/tramp-sh.el (tramp-sh-handle-verify-visited-file-modtime):
Date: Mon, 26 Aug 2013 07:00:55 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 114002
revision-id: address@hidden
parent: address@hidden
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Mon 2013-08-26 08:59:53 +0200
message:
  * net/tramp-sh.el (tramp-sh-handle-verify-visited-file-modtime):
  BUF can be optional.  (Bug#15186)
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/net/tramp-sh.el           trampsh.el-20100913133439-a1faifh29eqoi4nh-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-08-25 22:30:56 +0000
+++ b/lisp/ChangeLog    2013-08-26 06:59:53 +0000
@@ -1,3 +1,8 @@
+2013-08-26  Michael Albinus  <address@hidden>
+
+       * net/tramp-sh.el (tramp-sh-handle-verify-visited-file-modtime):
+       BUF can be optional.  (Bug#15186)
+
 2013-08-25  Xue Fuqiao  <address@hidden>
 
        * progmodes/flymake.el (flymake-get-real-file-name-function):

=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el      2013-08-17 10:20:15 +0000
+++ b/lisp/net/tramp-sh.el      2013-08-26 06:59:53 +0000
@@ -1234,14 +1234,14 @@
 
 ;; 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]