]> git.eshelyaron.com Git - emacs.git/commit
Support a function in the BUFFER-LIST arg of list-buffers-noselect (bug#59935)
authorJuri Linkov <juri@linkov.net>
Tue, 13 Dec 2022 17:47:47 +0000 (19:47 +0200)
committerJuri Linkov <juri@linkov.net>
Tue, 13 Dec 2022 17:48:45 +0000 (19:48 +0200)
commita99d0e7e6c903e0e1cb32a458802c1d8d7443cd9
tree57ecc4a6e8a155244e0daa82d12a5b5ded55fa6a
parentdef51dd6458d2f276018aaac36283bbe44428de7
Support a function in the BUFFER-LIST arg of list-buffers-noselect (bug#59935)

* lisp/buff-menu.el (Buffer-menu-buffer-list): New buffer-local variable.
(list-buffers-noselect): Set Buffer-menu-buffer-list to 'buffer-list'
that now keeps the buffer-local value of the provided buffer list
or a function that returns the buffer list.
(list-buffers--refresh): Handle buffer-list and Buffer-menu-buffer-list
as a function and as a list.

* lisp/progmodes/project.el (project-list-buffers): Let-bind
'buffer-list-function' used by both legacy code and the new version
of list-buffers-noselect that supports its arg BUFFER-LIST as a function.
lisp/buff-menu.el
lisp/progmodes/project.el