From: Paul Eggert Date: Fri, 17 Dec 2021 09:11:54 +0000 (-0800) Subject: Port tramp-adb.el back to Emacs 26 X-Git-Tag: emacs-29.0.90~3590^2~10 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=36d873bf0d3f1185d0090e4b506a6a726476aec6;p=emacs.git Port tramp-adb.el back to Emacs 26 * lisp/net/tramp-adb.el (tramp-adb-ls-output-time-less-p): Revert previous change since Tramp code should still be backward compatible to Emacs 26. But add a comment about this. Problem reported by Michael Albinus in: https://lists.gnu.org/r/emacs-devel/2021-12/msg01623.html --- diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index bc94092ce95..b662e0bf6cf 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el @@ -415,10 +415,12 @@ Emacs dired can't find files." (defun tramp-adb-ls-output-time-less-p (a b) "Sort \"ls\" output by time, descending." (let (time-a time-b) + ;; Once we can assume Emacs 27 or later, the two calls + ;; (apply #'encode-time X) can be replaced by (encode-time X). (string-match tramp-adb-ls-date-regexp a) - (setq time-a (encode-time (parse-time-string (match-string 0 a)))) + (setq time-a (apply #'encode-time (parse-time-string (match-string 0 a)))) (string-match tramp-adb-ls-date-regexp b) - (setq time-b (encode-time (parse-time-string (match-string 0 b)))) + (setq time-b (apply #'encode-time (parse-time-string (match-string 0 b)))) (time-less-p time-b time-a))) (defun tramp-adb-ls-output-name-less-p (a b)