Subject: bug#75935: tab-bar-select-tab buffer-list and buried-buffer-list bug

From: Ship Mints <[email-masked]>
Date: Wed, 29 Jan 2025 15:59:49 -0500

Happy to submit a patch for this but first wanted to discuss it to make
sure there's agreement.

(defun tab-bar-select-tab (&optional tab-number)
...
            (when wc-bl  (set-frame-parameter nil 'buffer-list wc-bl))
            (when wc-bbl (set-frame-parameter nil 'buried-buffer-list
wc-bbl))

What this skips is that if either the originating window-configuration
buffer-list or its twin is nil, that the frame's parameters are not
properly reset to nil.

This is a function that we've had to work around in an ELPA package by
advising tab-bar--tab to first clear these frame parameters before
tab-bar-select-tab goes to set them when selecting the specified tab. This
avoids the bug, but is annoying. This advice has been in place for three
years without issue.

The patch would eliminate the 'when' conditions.

What do you think?

-Stephane