branch: externals/consult
commit eca12621bbd852cd042d63a6c1b9ec677e6424fc
Author: Daniel Mendler <m...@daniel-mendler.de>
Commit: Daniel Mendler <m...@daniel-mendler.de>

    Rename consult-buffer-list to consult-buffer-list-function
---
 CHANGELOG.org |  4 ++--
 README.org    |  6 +++---
 consult.el    | 21 +++++++++------------
 3 files changed, 14 insertions(+), 17 deletions(-)

diff --git a/CHANGELOG.org b/CHANGELOG.org
index be21305795..3e3464fd14 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -4,8 +4,8 @@
 
 * Development
 
-- ~consult-buffer-list~: New customizable variable to support frame or tab
-  isolation. Set to ~consult--frame-buffer-list~ for frame isolation.
+- ~consult-buffer-list-function~: New customizable variable to support frame or
+  tab isolation. Set to ~consult--frame-buffer-list~ for frame isolation.
   Alternatively use buffer functions provided by packages like 
[[https://github.com/protesilaos/beframe][beframe]].
 
 * Version 2.6 (2025-06-28)
diff --git a/README.org b/README.org
index d629754de4..01a111fab7 100644
--- a/README.org
+++ b/README.org
@@ -107,8 +107,8 @@ their descriptions.
   - R Project roots
   - Custom [[#multiple-sources][other sources]] configured in 
=consult-buffer-sources=.
   By default, buffers from all frames are taken into account. The buffers which
-  are taken into account, can be customized by the variable 
~consult-buffer-list~.
-  Other buffers are available by pressing =o SPC=.
+  are taken into account, can be customized by the variable
+  =consult-buffer-list-function=. Other buffers are available by pressing =o 
SPC=.
 - =consult-buffer-other-window=, =consult-buffer-other-frame=,
   =consult-buffer-other-tab=: Variants of =consult-buffer=.
 - =consult-project-buffer=: Variant of =consult-buffer= restricted to buffers 
and
@@ -896,7 +896,7 @@ an overview of all Consult variables and functions with 
their descriptions.
 | consult-async-indicator          | Async indicator characters                
          |
 | consult-bookmark-narrow          | Narrowing configuration for 
=consult-bookmark=        |
 | consult-buffer-filter            | Filter for =consult-buffer=               
            |
-| consult-buffer-list              | Function to retrieve list of buffers      
          |
+| consult-buffer-list-function     | Function to retrieve list of buffers      
          |
 | consult-buffer-sources           | List of virtual buffer sources            
          |
 | consult-fd-args                  | Command line arguments for fd             
          |
 | consult-find-args                | Command line arguments for find           
          |
diff --git a/consult.el b/consult.el
index fefd286e80..4a9a5c7087 100644
--- a/consult.el
+++ b/consult.el
@@ -227,7 +227,7 @@ with a space character, the *Completions* buffer and a few 
log
 buffers.  The regular expressions are matched case sensitively."
   :type '(repeat regexp))
 
-(defcustom consult-buffer-list #'buffer-list
+(defcustom consult-buffer-list-function #'buffer-list
   "List of buffers to use for selection.
 By default, the variable is set to the function `buffer-list', which
 returns all buffers from all frames.  Set it to
@@ -4710,7 +4710,7 @@ to search and is passed to `consult--buffer-query'."
 
 (cl-defun consult--buffer-query ( &key sort directory mode as predicate 
(filter t)
                                   include (exclude consult-buffer-filter)
-                                  (buffer-list consult-buffer-list))
+                                  (buffer-list consult-buffer-list-function))
   "Query for a list of matching buffers.
 The function supports filtering by various criteria which are
 used throughout Consult.  In particular it is the backbone of
@@ -4936,9 +4936,8 @@ all frames.")
                                                (buffer-file-name buf))))))
   "Modified buffer source for `consult-buffer'.
 The source is hidden by default and can be summoned via its narrow key.
-Only buffers from the `consult-buffer-list' are taken into account.  If
-`consult-buffer-list' is customized to `consult--frame-buffer-list' only
-buffers belonging to the current frame or tab are shown.")
+Only buffers returned by the `consult-buffer-list-function' are taken
+into account.")
 
 (defvar consult--source-buffer
   `( :name     "Buffer"
@@ -4952,9 +4951,8 @@ buffers belonging to the current frame or tab are shown.")
      ,(lambda () (consult--buffer-query :sort 'visibility
                                         :as #'consult--buffer-pair)))
   "Buffer source for `consult-buffer'.
-Only buffers from the `consult-buffer-list' are taken into account.  If
-`consult-buffer-list' is customized to `consult--frame-buffer-list' only
-buffers belonging to the current frame or tab are shown.")
+Only buffers returned by the `consult-buffer-list-function' are taken into
+account.")
 
 (defvar consult--source-other-buffer
   `( :name     "Other Buffer"
@@ -4964,7 +4962,7 @@ buffers belonging to the current frame or tab are shown.")
      :face     consult-buffer
      :history  buffer-name-history
      :state    ,#'consult--buffer-state
-     :enabled  (lambda () (not (eq consult-buffer-list #'buffer-list)))
+     :enabled  (lambda () (not (eq consult-buffer-list-function 
#'buffer-list)))
      :items
      ,(lambda ()
         (let ((local (consult--string-hash (consult--buffer-query))))
@@ -4974,9 +4972,8 @@ buffers belonging to the current frame or tab are shown.")
                                  :buffer-list t))))
   "Source for `consult-buffer' for buffers from other frames or tabs.
 The source is hidden by default and can be summoned via its narrow key.
-Only buffers which are not part of the `consult-buffer-list' are taken
-into account.  This source is only enabled if `consult-buffer-list' is
-not equal to `buffer-list'.")
+Only buffers returned by the `consult-buffer-list-function' are taken
+into account.")
 
 (autoload 'consult-register--candidates "consult-register")
 

Reply via email to