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

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

[elpa] externals/consult ee62450027: consult--buffer-query: Ensure that


From: ELPA Syncer
Subject: [elpa] externals/consult ee62450027: consult--buffer-query: Ensure that the buffer-list is not modified destructively
Date: Fri, 10 May 2024 09:57:36 -0400 (EDT)

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

    consult--buffer-query: Ensure that the buffer-list is not modified 
destructively
---
 consult.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/consult.el b/consult.el
index 3849df4089..7966bea18e 100644
--- a/consult.el
+++ b/consult.el
@@ -4396,7 +4396,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 (buffer-list)))
+                                      (buffer-list t))
   "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
@@ -4411,6 +4411,7 @@ PREDICATE is a predicate function.
 BUFFER-LIST is the unfiltered list of buffers.
 AS is a conversion function."
   (let ((root (consult--normalize-directory directory)))
+    (setq buffer-list (if (eq buffer-list t) (buffer-list) (copy-sequence 
buffer-list)))
     (when sort
       (setq buffer-list (funcall (intern (format "consult--buffer-sort-%s" 
sort)) buffer-list)))
     (when (or filter mode as root)



reply via email to

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