Subject: bug#71386: 29.1; Frame is auto-deleted even when it has multiple tabs

From: Juri Linkov <[email-masked]>
Date: Sun, 16 Jun 2024 19:45:55 +0300

> +     ((and tab-bar-mode (> (length (funcall tab-bar-tabs-function frame)) 1))
> +      'tab)
>
> How would users get back the old behavior?  By customizing
> 'tab-bar-close-last-tab-choice', 'tab-bar-tab-prevent-close-functions'?

This patch just copies the logic of frame handling to tab handling.
There is no customization for frame handling, so there is
no customization for tab handling.

In window-deletable-p there is hard-coded 'frame-root-window-p'
that checks if the frame has only 1 window.  So the patch
does the same by checking if there is only 1 tab on the frame.

Also in window--delete the call of 'tab-bar-close-tab'
corresponds to the call 'delete-frame'.