Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

This commit is contained in:
Michael Albinus
2026-02-22 10:38:10 +01:00
2 changed files with 13 additions and 4 deletions

View File

@@ -511,9 +511,9 @@ terminal.
---
*** After deleting, 'delete-frame' now selects the most recently used frame.
Previously, after deleting a specified frame, 'delete-frame' would
select the next eligible frame in the order of the frame list. This is
often unrelated to frames' recent use and can appear somewhat random to
users.
select the oldest visible frame on the same terminal. To revert to the
old behavior, set the new user option
'after-delete-frame-select-mru-frame' to nil.
+++
*** New value 'force' for user option 'frame-inhibit-implied-resize'.

View File

@@ -2749,7 +2749,9 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
else
{
frame1 = Qnil;
if (!EQ (force, Qnoelisp))
if (after_delete_frame_select_mru_frame
&& !EQ (force, Qnoelisp))
{
/* Find the most recently used visible frame among all
frames on the same terminal as FRAME, excluding FRAME
@@ -7778,6 +7780,13 @@ The default is \\+`inhibit' in NS builds and nil everywhere else. */);
alter_fullscreen_frames = Qnil;
#endif
DEFVAR_BOOL ("after-delete-frame-select-mru-frame",
after_delete_frame_select_mru_frame,
doc: /* Non-nil means `delete-frame' selects most recently used frame.
If this is nil, `delete-frame' will select the oldest visible frame on
the same terminal. */);
after_delete_frame_select_mru_frame = true;
defsubr (&Sframe_id);
defsubr (&Sframep);
defsubr (&Sframe_live_p);