diff options
author | Glenn Morris <rgm@gnu.org> | 2010-11-09 19:57:32 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2010-11-09 19:57:32 -0800 |
commit | 73171bd4cc3333a43ef8810ba4f7d0a864f20fa8 (patch) | |
tree | a00e6939b432aa45fc7b18096a4f8baf7e77ab93 /lisp/eshell/em-pred.el | |
parent | 13e7256f9425c09c827827302fda440f95fe5c43 (diff) |
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.
Diffstat (limited to 'lisp/eshell/em-pred.el')
-rw-r--r-- | lisp/eshell/em-pred.el | 7 |
1 files changed, 3 insertions, 4 deletions
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 |