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

From: Eli Zaretskii <[email-masked]>
Date: Sun, 09 Jun 2024 21:16:34 +0300

> From: Juri Linkov <[email-masked]>
> Cc: [email-masked],  [email-masked],  [email-masked]
> Date: Sun, 09 Jun 2024 20:58:10 +0300
> 
> >> +(defun tab-bar-window-delete-frame (frame _kill)
> >> +  "Whether FRAME should be deleted when other tabs are available for that frame.
> >> +Instead of deleting the frame, close the current tab.
> >
> > The first and the second sentences contradict each other.  The first
> > implies that this is a predicate which returns a boolean, whereas the
> > second says that it closes the tab and negtlets to say anything about
> > the return value.
> >
> >> +(defvar window-delete-frame-functions nil
> >> +  "Don't delete frame when one of functions returns t.
> >> +Each of functions is called with two arguments: FRAME and KILL.
> >> +The function can perform an action instead of deleting the frame.")
> >
> > This doc string should at least explain what is the KILL argument and
> > its meaning.
> 
> I tried to improve these doc strings:

Thanks, they are more clear now.  But one point still needs
clarification, IMO:

> +(defvar window-delete-frame-functions nil
> +  "A list of functions to handle the frame deletion.
> +Each of functions is called with two arguments: FRAME and KILL where
> +KILL means the buffer shown in window will be killed.  When one of functions

So KILL is a boolean, and if it's non-nil, it means the buffer will be
killed?  If so, will the buffer be killed even if the function returns
non-nil?