[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/vcomplete 4019e76a3d 78/91: New internal function for gett
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/vcomplete 4019e76a3d 78/91: New internal function for getting the '*Completions*' window |
Date: |
Tue, 24 May 2022 15:59:11 -0400 (EDT) |
branch: elpa/vcomplete
commit 4019e76a3db21d748be42e7046244ed4c7edf8c5
Author: Daniel Semyonov <daniel@dsemy.com>
Commit: Daniel Semyonov <daniel@dsemy.com>
New internal function for getting the '*Completions*' window
* vcomplete.el (vcomplete--get-completions-window): New function.
(vcomplete-with-completions-buffer):
(vcomplete--disable-completion-in-region): Use the new function.
---
vcomplete.el | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/vcomplete.el b/vcomplete.el
index e459c77a44..112bb4c99b 100644
--- a/vcomplete.el
+++ b/vcomplete.el
@@ -128,14 +128,18 @@ Otherwise, operate according to `completion-auto-help'."
;;;; Completion commands:
+(defun vcomplete--get-completions-window ()
+ "Return the window associated with the `*Completions*' buffer).
+This function only searches the frames specified in `vcomplete-search-range'."
+ (get-buffer-window "*Completions*" vcomplete-search-range))
+
(defmacro vcomplete-with-completions-buffer (&rest body)
"Evaluate BODY with the `*Completions*' buffer temporarily current.
While evaluating BODY, BUFFER and WINDOW are locally bound to the
`*Completions*' buffer and window respectively."
(declare (debug (&rest form)))
`(when-let ((buffer (get-buffer "*Completions*"))
- (window (get-buffer-window
- buffer vcomplete-search-range)))
+ (window (vcomplete--get-completions-window)))
(save-current-buffer
(set-buffer buffer)
(unless (derived-mode-p 'completion-list-mode)
@@ -238,7 +242,7 @@ With prefix argument N, move N items (negative N means move
forward)."
;; immediately disabled through `vcomplete--update-in-region'.
(defun vcomplete--disable-completion-in-region ()
"Stop completion in region when there is no visible `*Completions*' buffer."
- (unless (get-buffer-window "*Completions*" vcomplete-search-range)
+ (unless (vcomplete--get-completions-window)
(completion-in-region-mode -1)))
(defun vcomplete--setup-completions ()
- [nongnu] elpa/vcomplete 5e055dc556 30/91: Fix cases where 'completion-in-region-mode' is used in the minibuffer, (continued)
- [nongnu] elpa/vcomplete 5e055dc556 30/91: Fix cases where 'completion-in-region-mode' is used in the minibuffer, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete 21edba4beb 01/91: Initial commit, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete faca6e8c18 32/91: ; Change all instances of "‘" and "’" to "`" and "'" respectively, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete db010f4f61 34/91: Mark variables as risky local variables, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete 5fefec3e91 40/91: Fix broken highlighting in completion list buffers when completing in-region, ELPA Syncer, 2022/05/24
- [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 <=
- [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, 2022/05/24
- [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