> > Because tabs have priority over frames. The precedence is: > > windows -> tabs -> frames. When there are many tabs > > then quit-restore-window should close tabs, and only > > on the last tab should delete the frame. This is bug#71386, > > but first need to finish bug#59862. > > So which bug are we discussing here? Bug#59862 or Bug#71386? I intended to finish first bug#59862, then to do bug#71386 later. But really they are closely related, so I fixed them both now and added corresponding references to bug numbers in comments. > >> I don't understand the problem yet. 'window-deletable-p' calls > >> 'frame-deletable-p' iff WINDOW is the root window of the frame. At this > >> time we can only either delete the frame or show another buffer in > >> WINDOW; tertium non datur. What am I missing? > > > > The third first-class citizen is the tab-bar. > > But I haven't written anything for the tab-bar code. This is something > you have to provide. Earlier you proposed So I extended this patch, and now all tests pass successfully with: