bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#59862: quit-restore per window buffer


From: martin rudalics
Subject: bug#59862: quit-restore per window buffer
Date: Thu, 13 Jun 2024 10:21:32 +0200
User-agent: Mozilla Thunderbird

> Could you show how the frame function corresponding to 'tab-bar-close-tab'
> (I suppose it's 'delete-frame'?)

Hardly.  'delete-frame' unconditionally deletes a frame regardless of
how many windows it displays unless it is the last frame, a surrogate
minibuffer frame or some other special condition holds.

> detects that where are more than 1 window
> on the frame, then it refuses to delete the frame.  Then same code could be
> used in 'tab-bar-close-tab'.

The check is in 'window-deletable-p' which may return 'frame' iff WINDOW
is its frame's root window.  Maybe you also want to check whether the
second element of 'quit-restore' is 'frame' but that I cannot tell.

Note in this context that 'window-deletable-p' does not cover all
special cases handled by 'delete-frame' - things like the
'delete-before' parameter or the 'delete-frame-functions' hook.  So far,
this apparently has not caused any problems though.

martin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]