diff options
Diffstat (limited to 'lisp/eshell/em-pred.el')
-rw-r--r-- | lisp/eshell/em-pred.el | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lisp/eshell/em-pred.el b/lisp/eshell/em-pred.el index 1cbd2367f53..dd3351b14d3 100644 --- a/lisp/eshell/em-pred.el +++ b/lisp/eshell/em-pred.el @@ -421,9 +421,8 @@ resultant list of strings." (forward-char)) (if (looking-at "[0-9]+") (progn - (setq when (- (float-time) - (* (string-to-number (match-string 0)) - quantum))) + (setq when (time-since (* (string-to-number (match-string 0)) + quantum))) (goto-char (match-end 0))) (setq open (char-after)) (if (setq close (memq open '(?\( ?\[ ?\< ?\{))) @@ -438,17 +437,17 @@ resultant list of strings." (attrs (file-attributes file))) (unless attrs (error "Cannot stat file `%s'" file)) - (setq when (float-time (nth attr-index attrs)))) + (setq when (nth attr-index attrs))) (goto-char (1+ end))) `(lambda (file) (let ((attrs (file-attributes file))) (if attrs (,(if (eq qual ?-) - '< + 'time-less-p (if (eq qual ?+) - '> - '=)) ,when (float-time - (nth ,attr-index attrs)))))))) + '(lambda (a b) (time-less-p b a)) + 'time-equal-p)) + ,when (nth ,attr-index attrs))))))) (defun eshell-pred-file-type (type) "Return a test which tests that the file is of a certain TYPE. |