[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/projectile ac60885: Port projectile-time-seconds to future
From: |
Paul Eggert |
Subject: |
[nongnu] elpa/projectile ac60885: Port projectile-time-seconds to future Emacs |
Date: |
Wed, 15 Dec 2021 12:30:48 -0500 (EST) |
branch: elpa/projectile
commit ac60885f2ab562de532a909619351930f852e66c
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>
Port projectile-time-seconds to future Emacs
Don’t assume internal format of Emacs timestamps.
They are documented to change in a future version.
This patch works on older Emacs versions; it can be simplified
to just use time-convert if we assume Emacs 27 or later.
---
projectile.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/projectile.el b/projectile.el
index 488df28..e67f56d 100644
--- a/projectile.el
+++ b/projectile.el
@@ -955,8 +955,10 @@ to invalidate."
(defun projectile-time-seconds ()
"Return the number of seconds since the unix epoch."
- (cl-destructuring-bind (high low _usec _psec) (current-time)
- (+ (lsh high 16) low)))
+ (if (fboundp 'time-convert)
+ (time-convert nil 'integer)
+ (cl-destructuring-bind (high low _usec _psec) (current-time)
+ (+ (lsh high 16) low))))
(defun projectile-cache-project (project files)
"Cache PROJECTs FILES.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/projectile ac60885: Port projectile-time-seconds to future Emacs,
Paul Eggert <=