From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#1450: w32_reset_fringes Date: Sat, 29 Nov 2008 12:43:21 +0100 Message-ID: <49312AD9.2090004@gmx.at> References: <492FE9A0.2080505@gmx.at> <492FF0A5.4050106@gmx.at> <493029E6.2060200@gmx.at> <87hc5rtslb.fsf@escher.local.home> Reply-To: martin rudalics , 1450@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------070707090207000504040403" X-Trace: ger.gmane.org 1227961129 14103 80.91.229.12 (29 Nov 2008 12:18:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 29 Nov 2008 12:18:49 +0000 (UTC) Cc: 1450@emacsbugs.donarmstrong.com To: Stephen Berman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 29 13:19:52 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L6Onf-0006ry-IO for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Nov 2008 13:19:51 +0100 Original-Received: from localhost ([127.0.0.1]:44873 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L6OmV-0001lR-8q for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Nov 2008 07:18:39 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L6OeW-0000fB-2Y for bug-gnu-emacs@gnu.org; Sat, 29 Nov 2008 07:10:24 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L6OeT-0000eR-QS for bug-gnu-emacs@gnu.org; Sat, 29 Nov 2008 07:10:23 -0500 Original-Received: from [199.232.76.173] (port=37084 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L6OeT-0000eN-JN for bug-gnu-emacs@gnu.org; Sat, 29 Nov 2008 07:10:21 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:33086) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L6OeT-0002ev-0G for bug-gnu-emacs@gnu.org; Sat, 29 Nov 2008 07:10:21 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mATCABE9020511; Sat, 29 Nov 2008 04:10:12 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mATBt5Ft015331; Sat, 29 Nov 2008 03:55:05 -0800 X-Loop: don@donarmstrong.com Resent-From: martin rudalics Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 29 Nov 2008 11:55:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1450 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1450-submit@emacsbugs.donarmstrong.com id=B1450.122795932713901 (code B ref 1450); Sat, 29 Nov 2008 11:55:04 +0000 Original-Received: (at 1450) by emacsbugs.donarmstrong.com; 29 Nov 2008 11:48:47 +0000 Original-Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id mATBmgZ7013895 for <1450@emacsbugs.donarmstrong.com>; Sat, 29 Nov 2008 03:48:44 -0800 Original-Received: (qmail invoked by alias); 29 Nov 2008 11:48:36 -0000 Original-Received: from 88-117-40-33.adsl.highway.telekom.at (EHLO [88.117.40.33]) [88.117.40.33] by mail.gmx.net (mp065) with SMTP; 29 Nov 2008 12:48:36 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/rzGgNAwLrCOkgucRw2kdyZYdKzwikTNnCmcJ/rG t0Xb4v522ncwtB User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) In-Reply-To: <87hc5rtslb.fsf@escher.local.home> X-Y-GMX-Trusted: 0 X-FuHaFi: 0.6899999999999999,0.48 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sat, 29 Nov 2008 07:10:23 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:22759 Archived-At: This is a multi-part message in MIME format. --------------070707090207000504040403 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit > A further datapoint: both the above as well as (setq default-frame-alist > '((minibuffer))) also induce a crash in GNU Emacs 23.0.60.16 > (i686-pc-linux-gnu, GTK+ Version 2.12.9) of 2008-11-20 on escher I attached a fairly secure and minimally invasive patch. Could you try it? Thanks, martin. --------------070707090207000504040403 Content-Type: text/plain; name="terminal-frame.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="terminal-frame.diff" *** frame.h.~1.145.~ 2008-11-14 07:21:31.062500000 +0100 --- frame.h 2008-11-29 12:27:15.156250000 +0100 *************** *** 1115,1120 **** --- 1115,1121 ---- Lisp_Object component, Lisp_Object subclass); =20 + extern Lisp_Object delete_frame P_ ((Lisp_Object, Lisp_Object)); =20 #endif /* HAVE_WINDOW_SYSTEM */ =20 *** frame.c.~1.399.~ 2008-11-29 12:04:07.515625000 +0100 --- frame.c 2008-11-29 12:26:53.468750000 +0100 *************** *** 1322,1341 **** =20 extern Lisp_Object Qrun_hook_with_args; =20 ! DEFUN ("delete-frame", Fdelete_frame, Sdelete_frame, 0, 2, "", ! doc: /* Delete FRAME, permanently eliminating it from use. ! If omitted, FRAME defaults to the selected frame. ! A frame may not be deleted if its minibuffer is used by other frames. ! Normally, you may not delete a frame if all other frames are invisible,= ! but if the second optional argument FORCE is non-nil, you may do so. !=20 ! This function runs `delete-frame-functions' before actually deleting th= e ! frame, unless the frame is a tooltip. ! The functions are run with one arg, the frame to be deleted. ! But FORCE inhibits this too. */) ! /* FORCE is non-nil when handling a disconnected terminal. */ ! (frame, force) ! Lisp_Object frame, force; { struct frame *f; struct frame *sf =3D SELECTED_FRAME (); --- 1322,1330 ---- =20 extern Lisp_Object Qrun_hook_with_args; =20 ! Lisp_Object ! delete_frame (frame, force) ! register Lisp_Object frame, force; { struct frame *f; struct frame *sf =3D SELECTED_FRAME (); *************** *** 1360,1371 **** if (NILP (force) && !other_visible_frames (f)) error ("Attempt to delete the sole visible or iconified frame"); =20 - #if 0 /* This is a nice idea, but x_connection_closed needs to be able to delete the last frame, if it is gone. */ ! if (NILP (XCDR (Vframe_list))) error ("Attempt to delete the only frame"); - #endif =20 /* Does this frame have a minibuffer, and is it the surrogate minibuffer for any other frame? */ --- 1349,1358 ---- if (NILP (force) && !other_visible_frames (f)) error ("Attempt to delete the sole visible or iconified frame"); =20 /* This is a nice idea, but x_connection_closed needs to be able to delete the last frame, if it is gone. */ ! if (NILP (XCDR (Vframe_list)) && !EQ (force, Qnoelisp)) error ("Attempt to delete the only frame"); =20 /* Does this frame have a minibuffer, and is it the surrogate minibuffer for any other frame? */ *************** *** 1386,1392 **** (FRAME_MINIBUF_WINDOW (XFRAME (this)))))) { /* If we MUST delete this frame, delete the other first. */ ! if (!NILP (force)) Fdelete_frame (this, force); else error ("Attempt to delete a surrogate minibuffer frame"); --- 1373,1379 ---- (FRAME_MINIBUF_WINDOW (XFRAME (this)))))) { /* If we MUST delete this frame, delete the other first. */ ! if (EQ (force, Qnoelisp)) Fdelete_frame (this, force); else error ("Attempt to delete a surrogate minibuffer frame"); *************** *** 1634,1639 **** --- 1621,1645 ---- =20 return Qnil; } +=20 + DEFUN ("delete-frame", Fdelete_frame, Sdelete_frame, 0, 2, "", + doc: /* Delete FRAME, permanently eliminating it from use. + If omitted, FRAME defaults to the selected frame. + A frame may not be deleted if its minibuffer is used by other frames. + Normally, you may not delete a frame if all other frames are invisible,= + but if the second optional argument FORCE is non-nil, you may do so. +=20 + This function runs `delete-frame-functions' before actually deleting th= e + frame, unless the frame is a tooltip. + The functions are run with one arg, the frame to be deleted. + But FORCE inhibits this too. */) + /* FORCE is non-nil when handling a disconnected terminal. */ + (frame, force) + Lisp_Object frame, force; + { + return delete_frame (frame, !NILP (force) ? Qt : Qnil); + } +=20 =0C /* Return mouse position in character cell units. */ =20 *** terminal.c.~1.13.~ 2008-11-29 12:04:07.843750000 +0100 --- terminal.c 2008-11-29 12:23:14.406250000 +0100 *************** *** 256,262 **** struct terminal **tp; Lisp_Object tail, frame; =20 ! /* Protect against recursive calls. Fdelete_frame calls the delete_terminal_hook when we delete our last frame. */ if (!terminal->name) return; --- 256,262 ---- struct terminal **tp; Lisp_Object tail, frame; =20 ! /* Protect against recursive calls. delete_frame calls the delete_terminal_hook when we delete our last frame. */ if (!terminal->name) return; *************** *** 270,276 **** if (FRAME_LIVE_P (f) && f->terminal =3D=3D terminal) { /* Maybe this should pass Qnoelisp rather than Qt? */ ! Fdelete_frame (frame, Qt); } } =20 --- 270,276 ---- if (FRAME_LIVE_P (f) && f->terminal =3D=3D terminal) { /* Maybe this should pass Qnoelisp rather than Qt? */ ! delete_frame (frame, Qnoelisp); } } --------------070707090207000504040403--