From: Michael Albinus Date: Mon, 9 May 2016 19:08:51 +0000 (+0200) Subject: Pacify byte compiler in tramp.el X-Git-Tag: emacs-26.0.90~1968 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a88f22bddef5be36a3227f0630c1465f76a87f78;p=emacs.git Pacify byte compiler in tramp.el * lisp/net/tramp.el (tramp-time-diff): Use `tramp-compat-funcall'. --- diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el index f1f31d0398e..0e9fcb501a7 100644 --- a/lisp/net/tramp-compat.el +++ b/lisp/net/tramp-compat.el @@ -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)))) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 57a6594880e..9f678554654 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -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