diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2019-08-01 13:38:41 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2019-08-01 13:48:29 +0200 |
commit | 5bccff7b5ba3529de29e12de151eb4bfb5859e08 (patch) | |
tree | 63674b0f0ad1e25145cc63f3505fd919af1f2db4 | |
parent | 3c31775527acbd3c4fdf47d01b8db28e7d78ecd3 (diff) | |
download | emacs-5bccff7b5ba3529de29e12de151eb4bfb5859e08.tar.gz emacs-5bccff7b5ba3529de29e12de151eb4bfb5859e08.tar.bz2 emacs-5bccff7b5ba3529de29e12de151eb4bfb5859e08.zip |
Remove some compat code in esh-util
* lisp/eshell/esh-util.el (eshell-parse-ange-ls): Remove
older-Emacs compat code.
-rw-r--r-- | lisp/eshell/esh-util.el | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el index 4835e63baa9..082403130d4 100644 --- a/lisp/eshell/esh-util.el +++ b/lisp/eshell/esh-util.el @@ -600,10 +600,7 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable. (setq host-users (cdr host-users)) (cdr (assoc user host-users)))))) -;; Add an autoload for parse-time-string -(if (and (not (fboundp 'parse-time-string)) - (locate-library "parse-time")) - (autoload 'parse-time-string "parse-time")) +(autoload 'parse-time-string "parse-time") (eval-when-compile (require 'ange-ftp nil t)) ; ange-ftp-parse-filename @@ -649,17 +646,14 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable. (size (string-to-number (match-string 5))) (name (ange-ftp-parse-filename)) (mtime - (if (fboundp 'parse-time-string) - (let ((moment (parse-time-string - (match-string 6)))) - (if (nth 0 moment) - (setcar (nthcdr 5 moment) - (decoded-time-year (decode-time))) - (setcar (nthcdr 0 moment) 0) - (setcar (nthcdr 1 moment) 0) - (setcar (nthcdr 2 moment) 0)) - (encode-time moment)) - (ange-ftp-file-modtime (expand-file-name name dir)))) + (let ((moment (parse-time-string (match-string 6)))) + (if (nth 0 moment) + (setcar (nthcdr 5 moment) + (decoded-time-year (decode-time))) + (setcar (nthcdr 0 moment) 0) + (setcar (nthcdr 1 moment) 0) + (setcar (nthcdr 2 moment) 0)) + (encode-time moment))) symlink) (if (string-match "\\(.+\\) -> \\(.+\\)" name) (setq symlink (match-string 2 name) |