From 36d873bf0d3f1185d0090e4b506a6a726476aec6 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 17 Dec 2021 01:11:54 -0800 Subject: [PATCH] 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 --- lisp/net/tramp-adb.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index bc94092ce9..b662e0bf6c 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el @@ -415,10 +415,12 @@ tramp-adb-sh-fix-ls-output (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) -- 2.32.0