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 12:41:31 -0500 Message-ID: <87ir36o3as.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> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1197308622 31070 80.91.229.12 (10 Dec 2007 17:43:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Dec 2007 17:43:42 +0000 (UTC) Cc: deego3@gmail.com, Stefan Monnier , emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 10 18:43:51 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 1J1mfT-0001Yv-Fy for ged-emacs-devel@m.gmane.org; Mon, 10 Dec 2007 18:43:47 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J1mfB-0003Zc-PS for ged-emacs-devel@m.gmane.org; Mon, 10 Dec 2007 12:43:29 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J1meB-0003J6-0T for emacs-devel@gnu.org; Mon, 10 Dec 2007 12:42:27 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J1me8-0003HM-Hz for emacs-devel@gnu.org; Mon, 10 Dec 2007 12:42:26 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J1me7-0003Gw-K3 for emacs-devel@gnu.org; Mon, 10 Dec 2007 12:42:23 -0500 Original-Received: from mtao05.charter.net ([209.225.8.179]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J1me1-00038P-0R; Mon, 10 Dec 2007 12:42:17 -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 <20071210174138.SOAR20095.mtao05.charter.net@aarprv02.charter.net>; Mon, 10 Dec 2007 12:41:38 -0500 Original-Received: from marie.gnufans.net ([66.168.196.121]) by aarprv02.charter.net with ESMTP id <20071210174138.KIGZ495.aarprv02.charter.net@marie.gnufans.net>; Mon, 10 Dec 2007 12:41:38 -0500 Original-Received: from deego by marie.gnufans.net with local (Exim 3.36 #1 (Debian)) id 1J1mdH-0004oG-00; Mon, 10 Dec 2007 12:41:31 -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: (Richard Stallman's message of "Sat, 08 Dec 2007 14:15:08 -0500") 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:84967 Archived-At: --=-=-= [...] 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. Loading loadup.el (source)... (/home/deego/emacscvs-anon/emacs/lisp) Loading emacs-lisp/byte-run... Loading emacs-lisp/backquote... Loading subr... Loading version.el (source)... Loading widget... Loading custom... Loading emacs-lisp/map-ynp... Loading cus-start... Loading international/mule... Loading international/mule-conf.el (source)... Loading env... 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 2007-12-10 11:56:34.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 1; } 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 --=-=-=--