diff options
| -rw-r--r-- | lisp/ls-lisp.el | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el index 28538a62721..6efc77b099e 100644 --- a/lisp/ls-lisp.el +++ b/lisp/ls-lisp.el | |||
| @@ -144,6 +144,24 @@ Otherwise they are treated as Emacs regexps (for backward compatibility)." | |||
| 144 | :type 'boolean | 144 | :type 'boolean |
| 145 | :group 'ls-lisp) | 145 | :group 'ls-lisp) |
| 146 | 146 | ||
| 147 | (defcustom ls-lisp-format-time-list | ||
| 148 | '("%b %e %H:%M" | ||
| 149 | "%b %e %Y") | ||
| 150 | "*List of `format-time-string' specs to display file time stamps. | ||
| 151 | They are used whenever a locale is not specified to use instead. | ||
| 152 | |||
| 153 | Syntax: (EARLY-TIME-FORMAT OLD-TIME-FORMAT) | ||
| 154 | |||
| 155 | The EARLY-TIME-FORMAT is used if file has been modified within the | ||
| 156 | current year. The OLD-TIME-FORMAT is used for older files. To use ISO | ||
| 157 | 8601 dates, you could set: | ||
| 158 | |||
| 159 | \(setq ls-lisp-format-time-list | ||
| 160 | '(\"%Y-%m-%d %H:%M\" | ||
| 161 | \"%Y-%m-%d \"))" | ||
| 162 | :type '(list string) | ||
| 163 | :group 'ls-lisp) | ||
| 164 | |||
| 147 | ;; Remember the original insert-directory function | 165 | ;; Remember the original insert-directory function |
| 148 | (or (featurep 'ls-lisp) ; FJW: unless this file is being reloaded! | 166 | (or (featurep 'ls-lisp) ; FJW: unless this file is being reloaded! |
| 149 | (fset 'original-insert-directory (symbol-function 'insert-directory))) | 167 | (fset 'original-insert-directory (symbol-function 'insert-directory))) |
| @@ -557,8 +575,8 @@ All ls time options, namely c, t and u, are handled." | |||
| 557 | (setq locale nil)) | 575 | (setq locale nil)) |
| 558 | (format-time-string | 576 | (format-time-string |
| 559 | (if (and (<= past-cutoff diff) (<= diff 0)) | 577 | (if (and (<= past-cutoff diff) (<= diff 0)) |
| 560 | (if locale "%m-%d %H:%M" "%b %e %H:%M") | 578 | (if locale "%m-%d %H:%M" (nth 0 ls-lisp-format-time-list)) |
| 561 | (if locale "%Y-%m-%d " "%b %e %Y")) | 579 | (if locale "%Y-%m-%d " (nth 1 ls-lisp-format-time-list))) |
| 562 | time)) | 580 | time)) |
| 563 | (error "Unk 0 0000")))) | 581 | (error "Unk 0 0000")))) |
| 564 | 582 | ||