diff options
author | Chris Feng <chris.w.feng@gmail.com> | 2018-03-23T15·57+0800 |
---|---|---|
committer | Chris Feng <chris.w.feng@gmail.com> | 2018-03-23T15·57+0800 |
commit | f4aa8389fc005240dcc2591fead706fd84ccaac8 (patch) | |
tree | aa71fc7c7845907a86ad2637d1f477a221f93bf7 /exwm-core.el | |
parent | 10eb27eddcfdea1ec27382ea74625af867ceca61 (diff) |
Fix a compatibility issue with Emacs 24
* exwm-core.el (exwm--defer): `time-add' in Emacs 24 only accept lists.
Diffstat (limited to 'exwm-core.el')
-rw-r--r-- | exwm-core.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/exwm-core.el b/exwm-core.el index 355b8b96c0ba..ab5159c6a7a4 100644 --- a/exwm-core.el +++ b/exwm-core.el @@ -126,7 +126,9 @@ Nil can be passed as placeholder." The action is to call FUNCTION with arguments ARGS. If Emacs is not idle, defer the action until Emacs is idle. Otherwise, defer the action until at least SECS seconds later." - `(run-with-idle-timer (time-add (or (current-idle-time) (- ,secs)) ,secs) + `(run-with-idle-timer (+ (float-time (or (current-idle-time) + (seconds-to-time (- ,secs)))) + ,secs) nil ,function ,@args)) |