1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 04:10:54 -08:00

Fix thinko in 'delete-other-frames'

* lisp/frame.el (delete-other-frames): In second round make sure
the candidate frame has not been deleted in the first round to
avoid that 'frame-terminal' and friends throw an error.
This commit is contained in:
Martin Rudalics 2025-11-04 10:08:19 +01:00
parent 08c1775264
commit df3706a3c3

View file

@ -2889,7 +2889,10 @@ deleting them."
(if iconify (iconify-frame this) (delete-frame this))))
;; In a second round consider all remaining frames.
(dolist (this frames)
(unless (or (eq this frame)
;; We did not recalculate FRAMES so make sure THIS is still a live
;; frame since otherwise 'frame-terminal' will throw an error.
(unless (or (not (frame-live-p this))
(eq this frame)
(eq this minibuffer-frame)
(not (eq (frame-terminal this) terminal))
;; When FRAME is a child frame, delete its siblings