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

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

bug#12764: 24.2; `quit-window' wrongly iconifies frame


From: Chong Yidong
Subject: bug#12764: 24.2; `quit-window' wrongly iconifies frame
Date: Tue, 30 Oct 2012 11:26:32 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

Romain Francoise <romain@orebokech.com> writes:

> There's a regression in Emacs 24 compared to Emacs 23 wrt the behavior
> of `quit-window'. In some circumstances, it iconifies frames that were
> existing before the current buffer was created, which (AIUI) it's not
> supposed to do.
>
> Recipe starting from `emacs -Q':
> - C-x 5 2 to create a new frame
> - in the new frame, M-x man RET emacs RET
> - C-x 0 to make the man buffer the current buffer
> - q
>
> When you hit `q' the frame gets iconified, even though it was not
> created by M-x man.

I think the attached patch is required to fix this.  Martin, please
review, thanks.

=== modified file 'lisp/window.el'
*** lisp/window.el      2012-10-27 08:58:30 +0000
--- lisp/window.el      2012-10-30 03:23:59 +0000
***************
*** 3556,3562 ****
         quad entry)
      (cond
       ((and (not prev-buffer)
!          (memq (nth 1 quit-restore) '(window frame))
           (eq (nth 3 quit-restore) buffer)
           ;; Delete WINDOW if possible.
           (window--delete window nil (eq bury-or-kill 'kill)))
--- 3556,3566 ----
         quad entry)
      (cond
       ((and (not prev-buffer)
!          (or (eq (nth 1 quit-restore) 'frame)
!              ;; If the window had been created on an existing frame,
!              ;; do not try to delete the frame.
!              (and (eq (nth 1 quit-restore) 'window)
!                   (not (eq (window-deletable-p window) 'frame))))
           (eq (nth 3 quit-restore) buffer)
           ;; Delete WINDOW if possible.
           (window--delete window nil (eq bury-or-kill 'kill)))






reply via email to

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