emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master bddd4d3 10/13: Use decoded time accessors in in em-


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master bddd4d3 10/13: Use decoded time accessors in in em-ls
Date: Tue, 30 Jul 2019 07:12:07 -0400 (EDT)

branch: master
commit bddd4d382a0e91c73326f1e278924ce9e5624cd7
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Use decoded time accessors in in em-ls
    
    * lisp/eshell/em-ls.el (eshell-ls-file): Use decoded time
    accessors.
---
 lisp/eshell/em-ls.el | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el
index 89969d3..b1aab79 100644
--- a/lisp/eshell/em-ls.el
+++ b/lisp/eshell/em-ls.el
@@ -525,12 +525,14 @@ whose cdr is the list of file attributes."
                " " (format-time-string
                     (concat
                      eshell-ls-date-format " "
-                     (if (= (nth 5 (decode-time))
-                            (nth 5 (decode-time
-                                    (nth (cond
-                                          ((eq sort-method 'by-atime) 4)
-                                          ((eq sort-method 'by-ctime) 6)
-                                          (t 5)) attrs))))
+                     (if (= (decoded-time-year (decode-time))
+                            (decoded-time-year
+                              (decode-time
+                              (nth (cond
+                                    ((eq sort-method 'by-atime) 4)
+                                    ((eq sort-method 'by-ctime) 6)
+                                    (t 5))
+                                    attrs))))
                          "%H:%M"
                        " %Y")) (nth (cond
                        ((eq sort-method 'by-atime) 4)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]