summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Turner <joseph@breatheoutbreathe.in>2023-08-18 23:30:18 -0700
committerJoseph Turner <joseph@breatheoutbreathe.in>2023-08-18 23:30:18 -0700
commitcd7657a522447a2b3a43e01e80f5ae7c6953de14 (patch)
tree72a03d93c5e8a9a83fea38bd6625a518895ff6ad
parent16a9550aa64ab6d803a985720aa2ae84c2b69e4e (diff)
Tidy: Just check timerp
timerp can handle nil as an argument.
-rw-r--r--timeout.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/timeout.el b/timeout.el
index 2a7c234..160b40b 100644
--- a/timeout.el
+++ b/timeout.el
@@ -45,7 +45,7 @@ function advice."
(result))
(lambda (orig-fn &rest args)
"Throttle calls to this function."
- (if (and throttle-timer (timerp throttle-timer))
+ (if (timerp throttle-timer)
result
(prog1
(setq result (apply orig-fn args))
@@ -67,7 +67,7 @@ This is intended for use as function advice."
(delay (or delay 0.50)))
(lambda (orig-fn &rest args)
"Debounce calls to this function."
- (when (and debounce-timer (timerp debounce-timer))
+ (when (timerp debounce-timer)
(cancel-timer debounce-timer))
(prog1 default
(setq debounce-timer