]> git.eshelyaron.com Git - emacs.git/commitdiff
Port tramp-adb.el back to Emacs 26
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 17 Dec 2021 09:11:54 +0000 (01:11 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 17 Dec 2021 09:12:20 +0000 (01:12 -0800)
* 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

index bc94092ce95a775c1bda9c19900121ec1da543bc..b662e0bf6cfea3cb747f6255abe373503b680222 100644 (file)
@@ -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)