summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2021-12-17 01:11:54 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2021-12-17 01:12:20 -0800
commit36d873bf0d3f1185d0090e4b506a6a726476aec6 (patch)
tree905d14feeba76bd9e93f2c32a820e1ba819fce48
parent1b2511fa2aed460120a36765ba16c14e355eef1d (diff)
downloademacs-36d873bf0d3f1185d0090e4b506a6a726476aec6.tar.gz
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
-rw-r--r--lisp/net/tramp-adb.el6
1 files changed, 4 insertions, 2 deletions
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)