Skip to content

Accommodate Emacs 31 earlier tab-bar-tab-post-open-functions#65

Open
shipmints wants to merge 1 commit intoflorommel:mainfrom
shipmints:shipmints-emacs31-early-tab-bar-tab-post-open-functions
Open

Accommodate Emacs 31 earlier tab-bar-tab-post-open-functions#65
shipmints wants to merge 1 commit intoflorommel:mainfrom
shipmints:shipmints-emacs31-early-tab-bar-tab-post-open-functions

Conversation

@shipmints
Copy link
Collaborator

See #64

  • bufferlo.el (bufferlo-mode): Add and remove 'bufferlo--tab-include-exclude-buffers-inhibit' on 'before-make-frame-hook'. Minor rearrangement to make more logical sense given call flow.
    (bufferlo--include-exclude-buffers): Uninhibit the block. (bufferlo--tab-include-exclude-buffers-inhibit): New defvar. (bufferlo--tab-include-exclude-buffers-inhibit): New defun to manage the defvar.
    (bufferlo--tab-include-exclude-buffers): Consult
    'bufferlo--tab-include-exclude-buffers-inhibit'.

See florommel#64

Starting in Emacs 31, 'tab-bar-tab-post-open-functions' are
called for the initial tab on a frame, and prior to
'after-make-frame-functions' when the 'tab-bar' is being set up
during frame initialization.  We ensure that
'bufferlo--tab-include-exclude-buffers' is skipped until
'bufferlo--include-exclude-buffers' is called after the frame is
created, and our curated 'buffer-list' parameter is initialized
for the frame/tab.  Therein after it is safe to call
'bufferlo--tab-include-exclude-buffers' for each subsequent new
tab.  This strategy is safe to use on Emacs < 31.

* bufferlo.el (bufferlo-mode): Add and remove
'bufferlo--tab-include-exclude-buffers-inhibit' on
'before-make-frame-hook'.  Minor rearrangement to make more
logical sense given call flow.
(bufferlo--include-exclude-buffers): Uninhibit the block.
(bufferlo--tab-include-exclude-buffers-inhibit): New defvar.
(bufferlo--tab-include-exclude-buffers-inhibit): New defun to
manage the defvar.
(bufferlo--tab-include-exclude-buffers): Consult
'bufferlo--tab-include-exclude-buffers-inhibit'.
@shipmints shipmints force-pushed the shipmints-emacs31-early-tab-bar-tab-post-open-functions branch from e70a91c to fa442c2 Compare March 1, 2026 17:00
@shipmints
Copy link
Collaborator Author

Rebased and documentation updated to explain the strategy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant