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

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

[nongnu] elpa/vcomplete cfb7099ab3 64/91: Unify search range user variab


From: ELPA Syncer
Subject: [nongnu] elpa/vcomplete cfb7099ab3 64/91: Unify search range user variables
Date: Tue, 24 May 2022 15:59:10 -0400 (EDT)

branch: elpa/vcomplete
commit cfb7099ab36b1a60b19277cfc43b84e56db6f0d0
Author: Daniel Semyonov <daniel@dsemy.com>
Commit: Daniel Semyonov <daniel@dsemy.com>

    Unify search range user variables
    
    * vcomplete.el (vcomplete-search-range): New custom variable replacing
    'vcomplete-minibuffer-search-range' and 'vcomplete-in-region-search-range'.
    (vcomplete-with-completions-buffer,vcomplete--disable-completion-in-region):
    Use 'vcomplete-search-range' instead of the removed variables.
---
 NEWS           |  6 +++---
 vcomplete.el   | 27 ++++-----------------------
 vcomplete.texi | 23 +++++++----------------
 3 files changed, 14 insertions(+), 42 deletions(-)

diff --git a/NEWS b/NEWS
index 9773e01716..3d5ded0922 100644
--- a/NEWS
+++ b/NEWS
@@ -3,9 +3,9 @@ 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.
+** Add 'vcomplete-search-range'.
+This custom variable is used to control in which frames the completion
+list buffer is searched for during completion.
 
 * 1.1
 
diff --git a/vcomplete.el b/vcomplete.el
index 2a276cb9de..ad5d472394 100644
--- a/vcomplete.el
+++ b/vcomplete.el
@@ -101,27 +101,8 @@ 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.
+(defcustom vcomplete-search-range 'visible
+  "Range of search for a `*Completions*' window during 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
@@ -151,7 +132,7 @@ 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 vcomplete-minibuffer-search-range)))
+                       buffer vcomplete-search-range)))
      (save-current-buffer
        (set-buffer buffer)
        (unless (derived-mode-p 'completion-list-mode)
@@ -256,7 +237,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*" vcomplete-in-region-search-range)
+  (unless (get-buffer-window "*Completions*" vcomplete-in-search-range)
     (completion-in-region-mode -1)))
 
 (defun vcomplete--setup-completions ()
diff --git a/vcomplete.texi b/vcomplete.texi
index 8e6b127dee..46db71b3b7 100644
--- a/vcomplete.texi
+++ b/vcomplete.texi
@@ -199,22 +199,13 @@ 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.
+@defopt vcomplete-search-range
+Range of search for a @code{completions} window during 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



reply via email to

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