]> code.delx.au - gnu-emacs/commitdiff
Pacify byte compiler in tramp.el
authorMichael Albinus <michael.albinus@gmx.de>
Mon, 9 May 2016 19:08:51 +0000 (21:08 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Mon, 9 May 2016 19:08:51 +0000 (21:08 +0200)
* lisp/net/tramp.el (tramp-time-diff): Use `tramp-compat-funcall'.

lisp/net/tramp-compat.el
lisp/net/tramp.el

index f1f31d0398e57af3591fcb8b4a2cf2ced52fc1c4..0e9fcb501a79e2cb0481d140f3f0cb8268e398a8 100644 (file)
@@ -50,9 +50,9 @@
 (unless (boundp 'remote-file-name-inhibit-cache)
   (defvar remote-file-name-inhibit-cache nil))
 
-;; For not existing functions, or functions with a changed argument
-;; list, there are compiler warnings.  We want to avoid them in cases
-;; we know what we do.
+;; For not existing functions, obsolete functions, or functions with a
+;; changed argument list, there are compiler warnings.  We want to
+;; avoid them in cases we know what we do.
 (defmacro tramp-compat-funcall (function &rest arguments)
   `(when (or (subrp ,function) (functionp ,function))
      (with-no-warnings (funcall ,function ,@arguments))))
index 57a6594880ea4f0ab6c2a998bdfd086a6a37651b..9f678554654b7750aa83a9e59f7ea5dca13d64db 100644 (file)
@@ -1723,7 +1723,6 @@ For definition of that list see `tramp-set-completion-function'."
 
 ;;; Fontification of `read-file-name':
 
-;; rfn-eshadow.el is part of Emacs 22.  It is autoloaded.
 (defvar tramp-rfn-eshadow-overlay)
 (make-variable-buffer-local 'tramp-rfn-eshadow-overlay)
 
@@ -4147,7 +4146,7 @@ Invokes `password-read' if available, `read-passwd' else."
   "Return the difference between the two times, in seconds.
 T1 and T2 are time values (as returned by `current-time' for example)."
   ;; Starting with Emacs 25.1, we could change this to use `time-subtract'.
-  (float-time (subtract-time t1 t2)))
+  (float-time (tramp-compat-funcall 'subtract-time t1 t2)))
 
 ;; Currently (as of Emacs 20.5), the function `shell-quote-argument'
 ;; does not deal well with newline characters.  Newline is replaced by