[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/vcomplete 84c888747e 81/91: Reset the '*Completions*' buff
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/vcomplete 84c888747e 81/91: Reset the '*Completions*' buffer when 'vcomplete-mode' is disabled |
Date: |
Tue, 24 May 2022 15:59:11 -0400 (EDT) |
branch: elpa/vcomplete
commit 84c888747e99c7ba2097d452318bbfc6ba80bde4
Author: Daniel Semyonov <daniel@dsemy.com>
Commit: Daniel Semyonov <daniel@dsemy.com>
Reset the '*Completions*' buffer when 'vcomplete-mode' is disabled
* vcomplete.el (vcomplete--reset-completions): New function.
(vcomplete-mode): Call 'vcomplete--reset-completions' when disabling.
---
NEWS | 3 +++
vcomplete.el | 8 ++++++++
2 files changed, 11 insertions(+)
diff --git a/NEWS b/NEWS
index 769835c67f..e2125183db 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,9 @@ See the end of the file for an explanation of the versioning
scheme.
* 1.2 (in development)
+** Fix the completion list window still highlighting completions in some
+cases after 'vcomplete-mode' is disabled.
+
** Improve Embark integration.
Fix Embark 'non-edit commands' not immediately exiting when
'vcomplete-auto-update' is t.
diff --git a/vcomplete.el b/vcomplete.el
index 26b1e8a6d7..d967fdfb0e 100644
--- a/vcomplete.el
+++ b/vcomplete.el
@@ -250,6 +250,13 @@ With prefix argument N, move N items (negative N means
move forward)."
(add-hook 'post-command-hook
#'vcomplete--highlight-completion-at-point nil t))
+(defun vcomplete--reset-completions ()
+ "Stop highlighting the completion at point in the `*Completions*' buffer."
+ (when-let ((buf (get-buffer "*Completions*")))
+ (with-current-buffer buf
+ (remove-hook 'post-command-hook
+ #'vcomplete--highlight-completion-at-point t))))
+
(defun vcomplete--setup-minibuffer ()
"Setup visual completions for the minibuffer."
(when minibuffer-completion-table ; Ensure completion is in progress.
@@ -297,6 +304,7 @@ The following bindings are available during completion:
(add-hook 'minibuffer-setup-hook #'vcomplete--setup-minibuffer)
(add-hook 'completion-in-region-mode-hook
#'vcomplete--setup-in-region))
(remove-hook 'completion-list-mode-hook #'vcomplete--setup-completions)
+ (vcomplete--reset-completions)
(remove-hook 'minibuffer-setup-hook #'vcomplete--setup-minibuffer)
(remove-hook 'completion-in-region-mode-hook
#'vcomplete--setup-in-region)))
- [nongnu] elpa/vcomplete b658642c23 12/91: * vcomplete.el (vcomplete-auto-help): Reset vars when setting, (continued)
- [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
- [nongnu] elpa/vcomplete 84c888747e 81/91: Reset the '*Completions*' buffer when 'vcomplete-mode' is disabled,
ELPA Syncer <=
- [nongnu] elpa/vcomplete a5763edf35 83/91: ; Bump to version 1.2, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete 2a5c215033 86/91: ; Prepare for NonGNU ELPA inclusion, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete 07f3483c0c 09/91: Improve usability of 'vcomplete-kill-buffer', ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete 24c4552d2f 54/91: Use a user option to control which commands cause auto updates, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete cfb7099ab3 64/91: Unify search range user variables, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete db35265ff2 74/91: ; Load 'subr-x' when byte-compiling, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete 695b22e213 79/91: ; Indentation fix and docstring change, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete e139895b51 66/91: Fix reference to void variable, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete 40ac892aa6 67/91: ; Consistently mark lisp variables and functions in NEWS, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete 3fe8f92f16 75/91: ; Remove unnecessary '; ' from lexical binding declaration, ELPA Syncer, 2022/05/24