]> git.eshelyaron.com Git - emacs.git/commitdiff
Have 'delete-other-frames' only delete frames on same terminal (Bug#78583)
authorMartin Rudalics <rudalics@gmx.at>
Tue, 27 May 2025 08:45:04 +0000 (10:45 +0200)
committerEshel Yaron <me@eshelyaron.com>
Tue, 27 May 2025 14:34:58 +0000 (16:34 +0200)
* lisp/frame.el (delete-other-frames): Only delete frames on
same terminal as FRAME's (Bug#78583).

(cherry picked from commit 93934b645bcda5cc07ead14c35615a44efae0681)

lisp/frame.el

index 9ffdae698b2a6c807fecf451b046a9ac510f8fcd..e0ab3c7dee38e701e55cc7b549f0523cee0bb86e 100644 (file)
@@ -2837,12 +2837,14 @@ deleting them."
   (interactive "i\nP")
   (setq frame (window-normalize-frame frame))
   (let ((minibuffer-frame (window-frame (minibuffer-window frame)))
+       (terminal (frame-terminal frame))
         (parent (frame-parent frame))
        (frames (frame-list)))
     ;; In a first round consider minibuffer-less frames only.
     (dolist (this frames)
       (unless (or (eq this frame)
                  (eq this minibuffer-frame)
+                 (not (eq (frame-terminal this) terminal))
                  (eq (window-frame (minibuffer-window this)) this)
                   ;; When FRAME is a child frame, delete its siblings
                   ;; only.
@@ -2854,6 +2856,7 @@ deleting them."
     (dolist (this frames)
       (unless (or (eq this frame)
                  (eq this minibuffer-frame)
+                 (not (eq (frame-terminal this) terminal))
                   ;; When FRAME is a child frame, delete its siblings
                   ;; only.
                   (and parent (not (eq (frame-parent this) parent)))