all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@gnu.org>
To: Martin Rudalics <rudalics@gmx.at>
Cc: Romain Francoise <romain@orebokech.com>, 12764@debbugs.gnu.org
Subject: bug#12764: 24.2; `quit-window' wrongly iconifies frame
Date: Tue, 30 Oct 2012 11:26:32 +0800	[thread overview]
Message-ID: <87pq408wt3.fsf@gnu.org> (raw)
In-Reply-To: <87hapdcfm7.fsf@silenus.orebokech.com> (Romain Francoise's message of "Mon, 29 Oct 2012 19:12:00 +0100")

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	other threads:[~2012-10-30  3:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-29 18:12 bug#12764: 24.2; `quit-window' wrongly iconifies frame Romain Francoise
2012-10-30  3:26 ` Chong Yidong [this message]
2012-10-30  8:40   ` Romain Francoise
2012-10-30 10:27   ` martin rudalics
2012-10-31 10:26     ` martin rudalics
2012-11-01  2:16       ` Chong Yidong
2012-11-04 20:48       ` Romain Francoise

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pq408wt3.fsf@gnu.org \
    --to=cyd@gnu.org \
    --cc=12764@debbugs.gnu.org \
    --cc=romain@orebokech.com \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.