From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jason Rumney Newsgroups: gmane.emacs.devel Subject: Re: Fixing numerous `message' bugs.. Date: Mon, 10 Dec 2007 18:04:01 +0000 Message-ID: <475D7F91.80503@gnu.org> References: <87myso8yrs.fsf@marie.gnufans.net> <87ve7b4xt6.fsf@marie.gnufans.net> <85abonpxnw.fsf@lola.goethe.zz> <85fxyel8o8.fsf@lola.goethe.zz> <87hciugzal.fsf@marie.gnufans.net> <87ir36o3as.fsf@marie.gnufans.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1197309877 3216 80.91.229.12 (10 Dec 2007 18:04:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Dec 2007 18:04:37 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dave Goel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 10 19:04:46 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1J1mzg-0002se-S9 for ged-emacs-devel@m.gmane.org; Mon, 10 Dec 2007 19:04:41 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J1mzP-0006q5-83 for ged-emacs-devel@m.gmane.org; Mon, 10 Dec 2007 13:04:23 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J1mzI-0006kD-Pt for emacs-devel@gnu.org; Mon, 10 Dec 2007 13:04:16 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J1mzF-0006dv-EH for emacs-devel@gnu.org; Mon, 10 Dec 2007 13:04:14 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J1mzF-0006df-3I for emacs-devel@gnu.org; Mon, 10 Dec 2007 13:04:13 -0500 Original-Received: from mk-outboundfilter-4-a-1.mail.uk.tiscali.com ([212.74.114.8]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J1mzE-0008Ub-RJ for emacs-devel@gnu.org; Mon, 10 Dec 2007 13:04:13 -0500 Original-X-Trace: 44989/mk-outboundfilter-2.mail.uk.tiscali.com/F2S/$ACCEPTED/Freedom2Surf-customers/83.67.23.108 X-SBRS: None X-RemoteIP: 83.67.23.108 X-IP-MAIL-FROM: jasonr@gnu.org X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAF8OXUdTQxds/2dsb2JhbAAI Original-Received: from i-83-67-23-108.freedom2surf.net (HELO [192.168.249.28]) ([83.67.23.108]) by smtp.f2s.tiscali.co.uk with ESMTP/TLS/DHE-RSA-AES256-SHA; 10 Dec 2007 18:04:11 +0000 User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) In-Reply-To: <87ir36o3as.fsf@marie.gnufans.net> X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:84968 Archived-At: Dave Goel wrote: > [...] > > > I am a C newbie. I was playing around with editfns.c that would > implement RMS's (message t ..) idea.. , and tried the attached patch. > It seemed to compile fine. But, compiling via 'make bootstrap' always > fails at the end with a segfault, as seen below. If I revert to the > original editfns.c, 'make bootstrap' finishes all the way to the end. > Any hints what I am doing wrong? Thanks. > You're returning 1, where a Lisp_Object is expected. I'd refactor your changes to the following, to make it clearer what is actually being changed (most of the diff you posted is whitespace changes due to increased nesting): if (NILP (args[0]) { message (0); return args[0]; } + else if (Fequal(args[0],Qt)) + { + register Lisp_Object val; + Lisp_Object argb[2]; + argb[0]=build_string("%s"); + argb[1]=args[1]; + val = Fformat (2, argb); + message3 (val, SBYTES (val), STRING_MULTIBYTE (val)); + return 1; + } else { register Lisp_Object val; val = Fformat (nargs, args);