From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: [jpw@pobox.com: crash setting frame parameter icon-name to non-nil non-string value] Date: Fri, 02 Jun 2006 12:35:32 -0400 Message-ID: <87irnjo6qz.fsf@stupidchicken.com> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1149266155 32046 80.91.229.2 (2 Jun 2006 16:35:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 2 Jun 2006 16:35:55 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 02 18:35:55 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FmCcq-000736-MN for ged-emacs-devel@m.gmane.org; Fri, 02 Jun 2006 18:35:52 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FmCcp-0006B0-EN for ged-emacs-devel@m.gmane.org; Fri, 02 Jun 2006 12:35:51 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FmCcb-00067U-F6 for emacs-devel@gnu.org; Fri, 02 Jun 2006 12:35:37 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FmCca-00066x-0I for emacs-devel@gnu.org; Fri, 02 Jun 2006 12:35:37 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FmCcZ-00066u-QT for emacs-devel@gnu.org; Fri, 02 Jun 2006 12:35:35 -0400 Original-Received: from [18.19.1.138] (helo=cyd) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FmCj2-0002rB-7E; Fri, 02 Jun 2006 12:42:16 -0400 Original-Received: by cyd (Postfix, from userid 1000) id 1E3374E26B; Fri, 2 Jun 2006 12:35:32 -0400 (EDT) Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Mon, 29 May 2006 14:02:05 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:55629 Archived-At: > From: jpw@pobox.com (John Paul Wallington) > Subject: crash setting frame parameter icon-name to non-nil non-string value > > M-: (set-frame-parameter nil 'icon-name 'crashme) > C-x 5 2 > > crash > > I'm not sure whether the following is a good fix so I didn't install it: > > 2006-05-29 John Paul Wallington > > * xfns.c (x_set_name_internal): Use `text' when `icon-name' isn't > a string rather than only when it is nil. > > - --- xfns.c 27 May 2006 22:23:05 +0100 1.665 > +++ xfns.c 29 May 2006 02:17:05 +0100 > @@ -1626,7 +1626,7 @@ > text.format = 8; > text.nitems = bytes; > > - - if (NILP (f->icon_name)) > + if (!STRINGP (f->icon_name)) > { > icon = text; > } I checked in another fix (patch below). Probably macfns.c and w32fns.c need to be fixed too. *** emacs/src/xfns.c.~1.665.~ 2006-04-17 18:12:24.000000000 -0400 --- emacs/src/xfns.c 2006-06-02 12:30:51.000000000 -0400 *************** *** 1249,1255 **** if (STRINGP (oldval) && EQ (Fstring_equal (oldval, arg), Qt)) return; } ! else if (!STRINGP (oldval) && EQ (oldval, Qnil) == EQ (arg, Qnil)) return; f->icon_name = arg; --- 1249,1255 ---- if (STRINGP (oldval) && EQ (Fstring_equal (oldval, arg), Qt)) return; } ! else if (!NILP (arg) || NILP (oldval)) return; f->icon_name = arg;