mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2026-09-10 07:46:51 -04:00
Simplify epa-ks--display-keys time calc
* lisp/epa-ks.el (epa-ks--display-keys): Simplify by using time-less-p. This also avoids a rounding error.
This commit is contained in:
parent
2dc98b69e0
commit
56b93016fc
|
|
@ -194,7 +194,7 @@ KEYS is a list of `epa-ks-key' structures, as parsed by
|
||||||
(if (epa-ks-key-expires key)
|
(if (epa-ks-key-expires key)
|
||||||
(let* ((date (epa-ks-key-expires key))
|
(let* ((date (epa-ks-key-expires key))
|
||||||
(str (format-time-string "%F" date)))
|
(str (format-time-string "%F" date)))
|
||||||
(when (< 0 (time-to-seconds (time-since date)))
|
(when (time-less-p date nil)
|
||||||
(setq str (propertize str 'face
|
(setq str (propertize str 'face
|
||||||
'font-lock-warning-face)))
|
'font-lock-warning-face)))
|
||||||
str)
|
str)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue