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

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

[elpa] externals/consult 5a265feacf 3/4: Shorter variable names


From: ELPA Syncer
Subject: [elpa] externals/consult 5a265feacf 3/4: Shorter variable names
Date: Fri, 27 Jan 2023 19:57:27 -0500 (EST)

branch: externals/consult
commit 5a265feacf4bcb3f1e3ab9fa3b90685344751c18
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Shorter variable names
---
 README.org |  4 ++--
 consult.el | 21 ++++++++++++---------
 2 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/README.org b/README.org
index 3b9c28b1ff..339a523ec8 100644
--- a/README.org
+++ b/README.org
@@ -906,8 +906,8 @@ an overview of all Consult variables and functions with 
their descriptions.
 | Variable                         | Description                               
            |
 
|----------------------------------+-------------------------------------------------------|
 | consult-after-jump-hook          | Functions to call after jumping to a 
location         |
-| consult-async-input-debounce     | Input debounce for asynchronous commands  
            |
-| consult-async-input-throttle     | Input throttle for asynchronous commands  
            |
+| consult-async-debounce           | Input debounce for asynchronous commands  
            |
+| consult-async-throttle           | Input throttle for asynchronous commands  
            |
 | consult-async-min-input          | Minimum numbers of letters needed for 
async process   |
 | consult-async-refresh-delay      | Refresh delay for asynchronous commands   
            |
 | consult-async-split-style        | Splitting style used for async commands   
            |
diff --git a/consult.el b/consult.el
index 278082d5d2..5435da85bb 100644
--- a/consult.el
+++ b/consult.el
@@ -102,19 +102,22 @@ seconds.  This applies to asynchronous commands like for 
example
 `consult-grep'."
   :type 'float)
 
-(defcustom consult-async-input-throttle 0.4
+(define-obsolete-variable-alias 'consult-async-input-debounce 
'consult-async-debounce "0.31")
+(define-obsolete-variable-alias 'consult-async-input-throttle 
'consult-async-throttle "0.31")
+
+(defcustom consult-async-throttle 0.4
   "Input throttle for asynchronous commands.
 
 The asynchronous process is started only every
-`consult-async-input-throttle' seconds.  This applies to asynchronous
+`consult-async-throttle' seconds.  This applies to asynchronous
 commands, e.g., `consult-grep'."
   :type 'float)
 
-(defcustom consult-async-input-debounce 0.2
+(defcustom consult-async-debounce 0.2
   "Input debounce for asynchronous commands.
 
 The asynchronous process is started only when there has not been new
-input for `consult-async-input-debounce' seconds.  This applies to
+input for `consult-async-debounce' seconds.  This applies to
 asynchronous commands, e.g., `consult-grep'."
   :type 'float)
 
@@ -2097,10 +2100,10 @@ BUILDER is the command line builder function."
 (defun consult--async-throttle (async &optional throttle debounce)
   "Create async function from ASYNC which throttles input.
 
-The THROTTLE delay defaults to `consult-async-input-throttle'.
-The DEBOUNCE delay defaults to `consult-async-input-debounce'."
-  (setq throttle (or throttle consult-async-input-throttle)
-        debounce (or debounce consult-async-input-debounce))
+The THROTTLE delay defaults to `consult-async-throttle'.
+The DEBOUNCE delay defaults to `consult-async-debounce'."
+  (setq throttle (or throttle consult-async-throttle)
+        debounce (or debounce consult-async-debounce))
   (let ((input "") last timer)
     (lambda (action)
       (pcase action
@@ -2180,7 +2183,7 @@ ASYNC is the sink.
 FUN computes the candidates given the input.
 DEBOUNCE is the time after which an interrupted computation
 should be restarted."
-  (setq debounce (or debounce consult-async-input-debounce))
+  (setq debounce (or debounce consult-async-debounce))
   (setq async (consult--async-indicator async))
   (let* ((request) (current) (timer)
          (cancel (lambda () (when timer (cancel-timer timer) (setq timer 
nil))))



reply via email to

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