[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/vcomplete fdb366a898 63/91: Allow controlling where to sea
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/vcomplete fdb366a898 63/91: Allow controlling where to search for the completion list buffer |
Date: |
Tue, 24 May 2022 15:59:09 -0400 (EDT) |
branch: elpa/vcomplete
commit fdb366a898b0b06e181cb5a342318f20bd1d5ca6
Author: Daniel Semyonov <daniel@dsemy.com>
Commit: Daniel Semyonov <daniel@dsemy.com>
Allow controlling where to search for the completion list buffer
* vcomplete.el (vcomplete-minibuffer-search-range)
(vcomplete-in-region-search-range): New custom variables.
---
NEWS | 6 ++++++
vcomplete.el | 43 +++++++++++++++++++++++++++++++++++++++++--
vcomplete.texi | 18 ++++++++++++++++++
3 files changed, 65 insertions(+), 2 deletions(-)
diff --git a/NEWS b/NEWS
index d982b290fa..9773e01716 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,12 @@
Vcomplete NEWS -- history of user-visible changes.
See the end of the file for an explanation of the versioning scheme.
+* 1.2 (in development)
+
+** Add the ability to control where to search for the completion list buffer.
+See custom variables 'vcomplete-minibuffer-search-range' and
+'vcomplete-in-region-search-range' for more information.
+
* 1.1
** Add the 'vcomplete-highlight' face.
diff --git a/vcomplete.el b/vcomplete.el
index c21db6f6ff..2a276cb9de 100644
--- a/vcomplete.el
+++ b/vcomplete.el
@@ -101,6 +101,44 @@ Otherwise, operate according to `completion-auto-help'."
:risky t
:package-version '(vcomplete . 1.1))
+(defcustom vcomplete-minibuffer-search-range 'visible
+ "Range of search for a `*Completions*' window during minibuffer completion.
+- t means consider all windows on all frames.
+- `visible' means consider all windows on all visible frames.
+- 0 (the number zero) means consider all windows on all visible and
+ iconified frames.
+- Any other value means consider all windows on the selected frame and
+ no others."
+ :link '(info-link "(Vcomplete)Customization")
+ :type '(radio (const :tag "All windows on all frames" t)
+ (const :tag "All windows on all visible frames" visible)
+ (const
+ :tag "All windows on all visible and iconified frames" 0)
+ (const
+ :tag "All windows on the currently selected frame"
+ nil))
+ :risky t
+ :package-version '(vcomplete . 1.2))
+
+(defcustom vcomplete-in-region-search-range 'visible
+ "Range of search for a `*Completions*' window during in region completion.
+- t means consider all windows on all frames.
+- `visible' means consider all windows on all visible frames.
+- 0 (the number zero) means consider all windows on all visible and
+ iconified frames.
+- Any other value means consider all windows on the selected frame and
+ no others."
+ :link '(info-link "(Vcomplete)Customization")
+ :type '(radio (const :tag "All windows on all frames" t)
+ (const :tag "All windows on all visible frames" visible)
+ (const
+ :tag "All windows on all visible and iconified frames" 0)
+ (const
+ :tag "All windows on the currently selected frame"
+ nil))
+ :risky t
+ :package-version '(vcomplete . 1.2))
+
(defface vcomplete-highlight '((t :inherit highlight))
"Face for highlighting completions."
:package-version '(vcomplete . 1.1))
@@ -112,7 +150,8 @@ Otherwise, operate according to `completion-auto-help'."
While evaluating BODY, BUFFER and WINDOW are locally bound to the
`*Completions*' buffer and window respectively."
`(when-let ((buffer (get-buffer "*Completions*"))
- (window (get-buffer-window buffer)))
+ (window (get-buffer-window
+ buffer vcomplete-minibuffer-search-range)))
(save-current-buffer
(set-buffer buffer)
(unless (derived-mode-p 'completion-list-mode)
@@ -217,7 +256,7 @@ With prefix argument N, move N items (negative N means move
forward)."
;; 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*")
+ (unless (get-buffer-window "*Completions*" vcomplete-in-region-search-range)
(completion-in-region-mode -1)))
(defun vcomplete--setup-completions ()
diff --git a/vcomplete.texi b/vcomplete.texi
index 6321df14bd..8e6b127dee 100644
--- a/vcomplete.texi
+++ b/vcomplete.texi
@@ -199,6 +199,24 @@ also true for other ``annotation providers'' such as the
Marginalia
package. Consider disabling them or this option on slow computers.
@end defopt
+@defopt vcomplete-minibuffer-search-range
+Range of search for a @code{completions} window during minibuffer
+completion. A value of @code{t} means consider all windows on all
+frames, @code{visible} means consider all windows on all visible
+frames, @code{0} (the number zero) means consider all windows on all
+visible and iconified frames and any other value means consider only
+the currently selected frame. By default, @code{visible} is used.
+@end defopt
+
+@defopt vcomplete-in-region-search-range
+Range of search for a @code{completions} window during minibuffer
+completion. A value of @code{t} means consider all windows on all
+frames, @code{visible} means consider all windows on all visible
+frames, @code{0} (the number zero) means consider all windows on all
+visible and iconified frames and any other value means consider only
+the currently selected frame. By default, @code{visible} is used.
+@end defopt
+
@menu
* Completion commands::
@end menu
- [nongnu] elpa/vcomplete db35265ff2 74/91: ; Load 'subr-x' when byte-compiling, (continued)
- [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
- [nongnu] elpa/vcomplete c66599c7a4 84/91: ; Update copyright years, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete 1106acfc5b 02/91: ; Fix various erroneous references to swsw, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete e59690bd71 58/91: * vcomplete.el (vcomplete-no-update-commands): Add 'choose-completion', ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete b4f5326ad8 57/91: ; Fix required Emacs version vcomplete-pkg.el, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete a280ce2c59 62/91: ; Bump to version 1.1, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete fdb366a898 63/91: Allow controlling where to search for the completion list buffer,
ELPA Syncer <=
- [nongnu] elpa/vcomplete 6c7ea30339 73/91: Fix and cleanup Embark integration, ELPA Syncer, 2022/05/24
- [nongnu] elpa/vcomplete acf575c8af 88/91: Remove Embark integration, ELPA Syncer, 2022/05/24