From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#12764: 24.2; `quit-window' wrongly iconifies frame Date: Tue, 30 Oct 2012 11:26:32 +0800 Message-ID: <87pq408wt3.fsf@gnu.org> References: <87hapdcfm7.fsf@silenus.orebokech.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1351567657 27798 80.91.229.3 (30 Oct 2012 03:27:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 30 Oct 2012 03:27:37 +0000 (UTC) Cc: Romain Francoise , 12764@debbugs.gnu.org To: Martin Rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 30 04:27:46 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TT2UT-0004tG-R4 for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Oct 2012 04:27:45 +0100 Original-Received: from localhost ([::1]:34013 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TT2UL-00069A-Cq for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Oct 2012 23:27:37 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49323) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TT2UI-00068A-KL for bug-gnu-emacs@gnu.org; Mon, 29 Oct 2012 23:27:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TT2UH-0002S8-H8 for bug-gnu-emacs@gnu.org; Mon, 29 Oct 2012 23:27:34 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56761) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TT2UH-0002S3-E7 for bug-gnu-emacs@gnu.org; Mon, 29 Oct 2012 23:27:33 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TT2Wg-0001c8-Bi for bug-gnu-emacs@gnu.org; Mon, 29 Oct 2012 23:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 30 Oct 2012 03:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12764 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12764-submit@debbugs.gnu.org id=B12764.13515677526119 (code B ref 12764); Tue, 30 Oct 2012 03:30:02 +0000 Original-Received: (at 12764) by debbugs.gnu.org; 30 Oct 2012 03:29:12 +0000 Original-Received: from localhost ([127.0.0.1]:38779 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TT2Vr-0001ae-PE for submit@debbugs.gnu.org; Mon, 29 Oct 2012 23:29:12 -0400 Original-Received: from mail-da0-f44.google.com ([209.85.210.44]:50791) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TT2Vp-0001aV-8G for 12764@debbugs.gnu.org; Mon, 29 Oct 2012 23:29:10 -0400 Original-Received: by mail-da0-f44.google.com with SMTP id h15so2637261dan.3 for <12764@debbugs.gnu.org>; Mon, 29 Oct 2012 20:26:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=LRGS3hbiV1jFr/zNHUdOFYMrzDeu84sIwptFxyivPgc=; b=suryD/Bq0P8XjyaTjGQBBut5ntsJ7KW70CK/hCzYzgpDfPwMiEkjBVr7iEKxWWqBfa +sVFoQH7olFuve1OOAeEH6xT1U9bMu7PjOGRvvgWGnBQRNBFqIUVD0jBtMaqxRZqzmMd EFadBfNyHHMtn85biOv9zlktGytDo1M0IZFdtg3mwByetm3rYneM+aiVZFu7XDervCFd Yxo3BUX9v+mY6Uir7cxFrFDZFGTCWM6di+weeSVa5+uQUuxXN2uUHlz6psPgD+4s+cfa JIqZzjbs04TCVMMv+INJ296T1g/tHxpbEoG5tbnLjZFqwFVa1o4myyPib23puPV41pNM njkQ== Original-Received: by 10.68.224.132 with SMTP id rc4mr98308059pbc.155.1351567598069; Mon, 29 Oct 2012 20:26:38 -0700 (PDT) Original-Received: from ulysses ([155.69.17.220]) by mx.google.com with ESMTPS id nm2sm6996477pbc.43.2012.10.29.20.26.34 (version=SSLv3 cipher=OTHER); Mon, 29 Oct 2012 20:26:36 -0700 (PDT) In-Reply-To: <87hapdcfm7.fsf@silenus.orebokech.com> (Romain Francoise's message of "Mon, 29 Oct 2012 19:12:00 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:66225 Archived-At: Romain Francoise 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)))