[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/vcomplete 0170c083a3 26/91: Eliminate delay after Embark a
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/vcomplete 0170c083a3 26/91: Eliminate delay after Embark action from minibuffer when auto updates are on |
Date: |
Tue, 24 May 2022 15:59:07 -0400 (EDT) |
branch: elpa/vcomplete
commit 0170c083a32c6d628536254b3660f7edd2a0be82
Author: Daniel Semyonov <cmstr@dsemy.com>
Commit: Daniel Semyonov <cmstr@dsemy.com>
Eliminate delay after Embark action from minibuffer when auto updates are on
* vcomplete.el (vcomplete-embark--eliminate-delay): New function which
is used as an advice around 'embark-act' and 'embark-default-action'
to eliminate the aforementioned delay.
(vcomplete-embark--advise-commands): New function which performs the
advising. Add to 'vcomplete-mode-hook' after loading Embark.
---
vcomplete.el | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/vcomplete.el b/vcomplete.el
index 47000b5d7a..4da1801540 100644
--- a/vcomplete.el
+++ b/vcomplete.el
@@ -278,6 +278,18 @@ completion:
(declare-function embark-target-completion-at-point "ext:embark")
(declare-function embark-completions-buffer-candidates "ext:embark")
+(defun vcomplete-embark--eliminate-delay (fun &rest args)
+ "Call FUN with ‘minibuffer-message-timeout’ locally set to ‘0’."
+ (let ((minibuffer-message-timeout 0))
+ (apply fun args)))
+
+(defun vcomplete-embark--advise-commands ()
+ "Advise Embark commands with ‘vcomplete-embark--eliminate-delay’."
+ (dolist (cmd '(embark-act embark-default-action))
+ (if vcomplete-mode
+ (advice-add cmd :around #'vcomplete-embark--eliminate-delay)
+ (advice-remove cmd #'vcomplete-embark--eliminate-delay))))
+
(defun vcomplete-embark-current-completion (&optional relative)
"Call ‘embark-target-completion-at-point’ in the ‘*Completions*’ buffer."
(when (and vcomplete-mode
@@ -293,6 +305,8 @@ completion:
(embark-completions-buffer-candidates))))
(with-eval-after-load 'embark
+ (add-hook 'vcomplete-mode-hook
+ #'vcomplete-embark--advise-commands)
(add-hook 'embark-target-finders
#'vcomplete-embark-current-completion)
(add-hook 'embark-candidate-collectors
- [nongnu] elpa/vcomplete 6136a3ba16 42/91: ; Update NEWS file, (continued)
- [nongnu] elpa/vcomplete 6136a3ba16 42/91: ; Update NEWS file, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete 8ade381c7c 44/91: Move Embark integration to a separate file, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete b8402112ba 60/91: ; Remove unnecessary declaration, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete b30cedbf26 65/91: ; Fix small style issue in info file, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete 8450b1befd 91/91: ; Bump to version 1.2.1, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete 4019e76a3d 78/91: New internal function for getting the '*Completions*' window, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete 3ac64b6241 87/91: ; Fix info node hyperlink in the commentary of vcomplete.el, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete 6dbdbf1a4b 82/91: ; Add build manifest, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete 739fee1af0 21/91: Cleanup automatic update code, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete 56a95cc1df 24/91: ; Fix indentation, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete 0170c083a3 26/91: Eliminate delay after Embark action from minibuffer when auto updates are on,
ELPA Syncer <=
- [nongnu] elpa/vcomplete b658642c23 12/91: * vcomplete.el (vcomplete-auto-help): Reset vars when setting, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete b53c3d8caa 35/91: ; Fix case in license part of vcomplete.el, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete b831752c4c 50/91: Refactor auto updating of the completion list buffer, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete 336cfaad33 68/91: Remove unnecessary (while-no-input (redisplay) ...) block, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete 31b7cfbb45 70/91: ; Small change to 'vcomplete-mode's docstring, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete 5a7d90596b 72/91: ; Move local mode declaration to the top of NEWS, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete 9df472e302 85/91: ; Indicate the mailing list is the "maintainer" of the package, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete 8ca95b2c81 80/91: Rename `vcomplete--update-in-minibuffer', ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete cd8411949c 77/91: ; Update package URL to https://dsemy.com/projects/vcomplete, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete ed98c1b50d 90/91: ; Change to NEWS, ELPA Syncer, 2022/05/24