branch: externals/bufferlo commit 0f08341f4356803bbd00acc7d7cf2b30266b90f4 Author: shipmints <shipmi...@gmail.com> Commit: shipmints <shipmi...@gmail.com>
Synchronize tab bookmark entries bookmark list and buffer list Previously, only the bookmark name list was filtered. Now they both respect 'bufferlo--bookmark-filter-buffers'. --- bufferlo.el | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/bufferlo.el b/bufferlo.el index 19efd68d40..be3008cdfb 100644 --- a/bufferlo.el +++ b/bufferlo.el @@ -2131,20 +2131,22 @@ local buffer list to use. If it is nil, the current frame is used." buffers))) (seq-union buffers-excl buffers-incl))) -(defun bufferlo--bookmark-get-for-buffers-in-tab (frame) +(defun bufferlo--bookmark-get-for-buffers-in-tab (buffers) "Get bookmarks for all buffers of the selected tab in FRAME." - (with-selected-frame (or frame (selected-frame)) - (seq-filter #'identity - (mapcar #'bufferlo--bookmark-get-for-buffer - (bufferlo--bookmark-filter-buffers frame))))) + (seq-filter #'identity + (mapcar #'bufferlo--bookmark-get-for-buffer + buffers))) (defun bufferlo--bookmark-tab-make (&optional frame) "Get the bufferlo tab bookmark for the current tab in FRAME. FRAME specifies the frame; the default value of nil selects the current frame." - `((buffer-bookmarks . ,(bufferlo--bookmark-get-for-buffers-in-tab frame)) - (buffer-list . ,(mapcar #'buffer-name (bufferlo-buffer-list frame nil t))) - (window . ,(window-state-get (frame-root-window frame) 'writable)) - (handler . ,#'bufferlo--bookmark-tab-handler))) + (let ((filtered-buffers + (with-selected-frame (or frame (selected-frame)) + (bufferlo--bookmark-filter-buffers frame)))) + `((buffer-bookmarks . ,(bufferlo--bookmark-get-for-buffers-in-tab filtered-buffers)) + (buffer-list . ,(mapcar #'buffer-name filtered-buffers)) + (window . ,(window-state-get (frame-root-window frame) 'writable)) + (handler . ,#'bufferlo--bookmark-tab-handler)))) (defun bufferlo--ws-replace-buffer-names (ws replace-alist) "Replace buffer names according to REPLACE-ALIST in the window state WS."