From 2ba4be8a9860dc4f1a7c7dbb29cf116afaca7943 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 9 Nov 2010 19:57:32 -0800 Subject: Replace some eshell functions that duplicate standard functions. * lisp/eshell/esh-util.el (eshell-time-less-p, eshell-time-to-seconds): Remove. (eshell-read-passwd, eshell-read-hosts): Use time-less-p. * lisp/eshell/esh-test.el (eshell-test, eshell-show-usage-metrics): * lisp/eshell/em-unix.el (eshell-show-elapsed-time, eshell/time): * lisp/eshell/em-pred.el (eshell-pred-file-time): Use float-time. * lisp/eshell/em-ls.el (eshell-ls-sort-entries): Use time-less-p. --- lisp/eshell/em-pred.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lisp/eshell/em-pred.el') diff --git a/lisp/eshell/em-pred.el b/lisp/eshell/em-pred.el index 15a3deea30c..2b5cb1a0dc4 100644 --- a/lisp/eshell/em-pred.el +++ b/lisp/eshell/em-pred.el @@ -427,7 +427,7 @@ returning the resultant string." (forward-char)) (if (looking-at "[0-9]+") (progn - (setq when (- (eshell-time-to-seconds (current-time)) + (setq when (- (float-time) (* (string-to-number (match-string 0)) quantum))) (goto-char (match-end 0))) @@ -444,7 +444,7 @@ returning the resultant string." (attrs (file-attributes file))) (unless attrs (error "Cannot stat file `%s'" file)) - (setq when (eshell-time-to-seconds (nth attr-index attrs)))) + (setq when (float-time (nth attr-index attrs)))) (goto-char (1+ end))) `(lambda (file) (let ((attrs (file-attributes file))) @@ -453,7 +453,7 @@ returning the resultant string." '< (if (eq qual ?+) '> - '=)) ,when (eshell-time-to-seconds + '=)) ,when (float-time (nth ,attr-index attrs)))))))) (defun eshell-pred-file-type (type) @@ -605,5 +605,4 @@ that 'ls -l' will show in the first column of its display. " ;; generated-autoload-file: "esh-groups.el" ;; End: -;; arch-tag: 8b5ce022-17f3-4c40-93c7-5faafaa63f31 ;;; em-pred.el ends here -- cgit v1.2.1