From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dave Goel Newsgroups: gmane.emacs.devel Subject: Re: Fixing numerous `message' bugs.. Date: Mon, 10 Dec 2007 14:05:17 -0500 Message-ID: <877ijmmkuq.fsf@marie.gnufans.net> 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> <475D7F91.80503@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1197313667 18293 80.91.229.12 (10 Dec 2007 19:07:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Dec 2007 19:07:47 +0000 (UTC) Cc: Dave Goel , emacs-devel@gnu.org To: Jason Rumney Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 10 20:07:57 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 1J1nyp-00057L-E6 for ged-emacs-devel@m.gmane.org; Mon, 10 Dec 2007 20:07:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J1nyX-0001cn-Pp for ged-emacs-devel@m.gmane.org; Mon, 10 Dec 2007 14:07:33 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J1nwi-0008Nw-FO for emacs-devel@gnu.org; Mon, 10 Dec 2007 14:05:40 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J1nwg-0008Mf-OC for emacs-devel@gnu.org; Mon, 10 Dec 2007 14:05:40 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J1nwg-0008MO-GZ for emacs-devel@gnu.org; Mon, 10 Dec 2007 14:05:38 -0500 Original-Received: from mtao05.charter.net ([209.225.8.179]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J1nwa-0004nQ-Vs; Mon, 10 Dec 2007 14:05:33 -0500 Original-Received: from aarprv02.charter.net ([10.20.200.72]) by mtao05.charter.net (InterMail vM.7.08.02.00 201-2186-121-20061213) with ESMTP id <20071210190521.EIEA20095.mtao05.charter.net@aarprv02.charter.net>; Mon, 10 Dec 2007 14:05:21 -0500 Original-Received: from marie.gnufans.net ([66.168.196.121]) by aarprv02.charter.net with ESMTP id <20071210190521.NUYU495.aarprv02.charter.net@marie.gnufans.net>; Mon, 10 Dec 2007 14:05:21 -0500 Original-Received: from deego by marie.gnufans.net with local (Exim 3.36 #1 (Debian)) id 1J1nwL-0003CN-00; Mon, 10 Dec 2007 14:05:17 -0500 X-Face: #5@=vrmx5t3mZaPY8(mR.n+V#:%4NW7j5A&^}@lGp2rK; CQ4%iH1v'gh/^A)w5*6c&R2(P' 4+seYDq8OK'LPI/C(C^A*w|f*t+8, 'T8b#_0~h3!A7GoVroE[cr0Fb'A0%SdU|Lk@gBV&1vA In-Reply-To: <475D7F91.80503@gnu.org> (Jason Rumney's message of "Mon, 10 Dec 2007 18:04:01 +0000") User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) X-Chzlrs: 0 X-detected-kernel: by monty-python.gnu.org: Solaris 10 (1203?) 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:84970 Archived-At: --=-=-= >> > You're returning 1, where a Lisp_Object is expected. Thanks. I corrected it to return val, but still get the same segfault upon "make bootstrap". Attached is the current diff, but it is much easier to simply read the new function I am trying -- DEFUN ("message", Fmessage, Smessage, 1, MANY, 0, doc: /* Display a message at the bottom of the screen. . . usage: (message FORMAT-STRING &rest ARGS) */) (nargs, args) int nargs; Lisp_Object *args; { 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 val; } else { if (NILP (args[0]) || (STRINGP (args[0]) && SBYTES (args[0]) == 0)) { message (0); return args[0]; } else { register Lisp_Object val; val = Fformat (nargs, args); message3 (val, SBYTES (val), STRING_MULTIBYTE (val)); return val; } } } The error remains: . Loading loadup.el (source)... . Loading emacs-lisp/byte-run... . . Loading format... Loading bindings... Loading files... Loading cus-face... Loading faces... Loading button... Loading startup... make[3]: *** [emacs] Segmentation fault make[3]: Leaving directory .. make[2]: *** [src] Error 2 --=-=-= Content-Type: text/x-csrc Content-Disposition: inline; filename=editfnsdiff200711.c --- editfns.c 2007-12-10 11:56:42.000000000 -0500 +++ editfnsmy.c.200711 2007-12-10 13:59:36.000000000 -0500 @@ -3221,25 +3221,40 @@ any existing message; this lets the minibuffer contents show. See also `current-message'. +If the first argument is t, the function is equivalent to calling +(message "%s" second-argument). + usage: (message FORMAT-STRING &rest ARGS) */) (nargs, args) int nargs; Lisp_Object *args; { - if (NILP (args[0]) - || (STRINGP (args[0]) - && SBYTES (args[0]) == 0)) + if (Fequal(args[0],Qt)) { - message (0); - return args[0]; + 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 val; } else { - register Lisp_Object val; - val = Fformat (nargs, args); - message3 (val, SBYTES (val), STRING_MULTIBYTE (val)); - return val; - } + if (NILP (args[0]) + || (STRINGP (args[0]) + && SBYTES (args[0]) == 0)) + { + message (0); + return args[0]; + } + else + { + register Lisp_Object val; + val = Fformat (nargs, args); + message3 (val, SBYTES (val), STRING_MULTIBYTE (val)); + return val; + }} } DEFUN ("message-box", Fmessage_box, Smessage_box, 1, MANY, 0, --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --=-=-=--