emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ivy-hydra 48e56da 305/395: Extend :type of counsel-asyn


From: Basil L. Contovounesios
Subject: [elpa] externals/ivy-hydra 48e56da 305/395: Extend :type of counsel-async-command-delay
Date: Thu, 25 Feb 2021 08:32:26 -0500 (EST)

branch: externals/ivy-hydra
commit 48e56daadeb8dd9e19bd4b13217e7ab276b25239
Author: Basil L. Contovounesios <contovob@tcd.ie>
Commit: Basil L. Contovounesios <contovob@tcd.ie>

    Extend :type of counsel-async-command-delay
    
    * counsel.el (counsel-async-command-delay): Remove redundant :group
    tag.  Support both integer and floating point values.
    (counsel--async-command): Use zerop accordingly.
    
    Re: #2556.
---
 counsel.el | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/counsel.el b/counsel.el
index b304e14..a3d1332 100644
--- a/counsel.el
+++ b/counsel.el
@@ -231,17 +231,16 @@ respectively."
     (set-process-filter proc (or filter #'counsel--async-filter))
     proc))
 
-(defcustom counsel-async-command-delay 0.0
+(defcustom counsel-async-command-delay 0
   "Number of seconds to wait before spawning another async command."
-  :type 'float
-  :group 'counsel)
+  :type 'number)
 
 (defun counsel--async-command (&rest args)
   "Like `counsel--async-command-1', with same ARGS, but debounced.
 Calls to `counsel--async-command-1' are separated by at least
 `counsel-async-command-delay' seconds, so as to avoid issues
 caused by spawning too many subprocesses too quickly."
-  (if (= counsel-async-command-delay 0.0)
+  (if (zerop counsel-async-command-delay)
       (apply #'counsel--async-command-1 args)
     (when counsel--async-timer
       (cancel-timer counsel--async-timer))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]