From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: Killing a frame sometimes kills emacs Date: Fri, 18 Nov 2011 10:38:39 +0100 Message-ID: <87sjllepnk.fsf@tsdh.uni-koblenz.de> References: <87d3flnxoo.fsf@thinkpad.tsdh.de> <83fwkhdld0.fsf@gnu.org> <871uw04lr9.fsf@thinkpad.tsdh.de> <87sjog35jj.fsf@thinkpad.tsdh.de> <4E5F7ECD.9060601@swipnet.se> <838vq8e0x5.fsf@gnu.org> <87sjn03tzx.fsf@thinkpad.tsdh.de> <87sjmzbmvv.fsf@thinkpad.tsdh.de> <87vcrvm0dr.fsf@stupidchicken.com> <87aa96ogb3.fsf@thinkpad.tsdh.de> <8762ijjbzu.fsf@tsdh.uni-koblenz.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1321609138 24022 80.91.229.12 (18 Nov 2011 09:38:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 18 Nov 2011 09:38:58 +0000 (UTC) Cc: Chong Yidong , emacs-devel@gnu.org, schwab@linux-m68k.org, James Cloos , Eli Zaretskii , "Jan D." , Ulrich Mueller To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 18 10:38:52 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RRKuK-0003X4-4k for ged-emacs-devel@m.gmane.org; Fri, 18 Nov 2011 10:38:52 +0100 Original-Received: from localhost ([::1]:52540 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RRKuJ-0006wd-3b for ged-emacs-devel@m.gmane.org; Fri, 18 Nov 2011 04:38:51 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:49906) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RRKuG-0006wW-On for emacs-devel@gnu.org; Fri, 18 Nov 2011 04:38:49 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RRKuF-0002ij-JZ for emacs-devel@gnu.org; Fri, 18 Nov 2011 04:38:48 -0500 Original-Received: from deliver.uni-koblenz.de ([141.26.64.15]:39351) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RRKuD-0002i9-7u; Fri, 18 Nov 2011 04:38:45 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 538F4D22E4; Fri, 18 Nov 2011 10:38:44 +0100 (CET) X-Virus-Scanned: amavisd-new at uni-koblenz.de Original-Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yX7w-OxyDzxL; Fri, 18 Nov 2011 10:38:43 +0100 (CET) X-CHKRCPT: Envelopesender noch tassilo@member.fsf.org Original-Received: from tsdh.uni-koblenz.de (tsdh.uni-koblenz.de [141.26.67.142]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by deliver.uni-koblenz.de (Postfix) with ESMTPSA id 56E08D22CB; Fri, 18 Nov 2011 10:38:43 +0100 (CET) In-Reply-To: (Stefan Monnier's message of "Thu, 17 Nov 2011 21:05:14 -0500") User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.91 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 141.26.64.15 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:146086 Archived-At: Stefan Monnier writes: Hi Stefan, > To avoid the risk of reaching 0 via wrap-around (yes, I know that > creating a billion frames in the life of a single session is unlikely, > but still), you could do: > > /* If needed, delete the terminal that this frame was on. > (This must be done after the frame is killed.) */ > terminal->reference_count--; > #ifdef USE_GTK > /* ... (Use C-style not C++ style comments) ... */ > if (terminal->reference_count == 0 && terminal->type == output_x_window) > terminal->reference_count = 1; > #endif > if (terminal->reference_count == 0) > { > Lisp_Object tmp; I liked this version best and it's committed now. Bye, Tassilo -- (What the world needs (I think) is not (a Lisp (with fewer parentheses)) but (an English (with more.))) Brian Hayes, http://tinyurl.com/3y9l2kf