From: Dave Goel <deego3@gmail.com>
To: Jason Rumney <jasonr@gnu.org>
Cc: Dave Goel <deego3@gmail.com>, emacs-devel@gnu.org
Subject: Re: Fixing numerous `message' bugs..
Date: Mon, 10 Dec 2007 14:05:17 -0500 [thread overview]
Message-ID: <877ijmmkuq.fsf@marie.gnufans.net> (raw)
In-Reply-To: <475D7F91.80503@gnu.org> (Jason Rumney's message of "Mon, 10 Dec 2007 18:04:01 +0000")
[-- Attachment #1: Type: text/plain, Size: 1350 bytes --]
>>
> 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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: editfnsdiff200711.c --]
[-- Type: text/x-csrc, Size: 1380 bytes --]
--- 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,
[-- Attachment #3: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
next prev parent reply other threads:[~2007-12-10 19:05 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-06 0:14 Fixing numerous `message' bugs D. Goel
2007-12-06 10:56 ` David Kastrup
2007-12-06 14:36 ` Dave Goel
2007-12-06 19:26 ` Glenn Morris
2007-12-06 19:34 ` Dave Goel
2007-12-06 20:21 ` Johan Bockgård
2007-12-07 5:28 ` Glenn Morris
2007-12-07 15:52 ` Dave Goel
2007-12-06 15:53 ` Stefan Monnier
2007-12-06 16:01 ` Dave Goel
2007-12-06 16:49 ` Stefan Monnier
2007-12-06 16:58 ` David Kastrup
2007-12-06 17:19 ` David Kastrup
2007-12-07 17:17 ` Richard Stallman
2007-12-07 17:37 ` David Kastrup
2007-12-07 17:17 ` Richard Stallman
2007-12-07 17:18 ` Richard Stallman
2007-12-07 17:24 ` David Kastrup
2007-12-07 18:00 ` Dave Goel
2007-12-07 18:38 ` Stefan Monnier
2007-12-08 0:56 ` Glenn Morris
2007-12-08 2:21 ` Stefan Monnier
2007-12-08 10:55 ` David Kastrup
2007-12-08 19:15 ` Richard Stallman
2007-12-10 17:41 ` Dave Goel
2007-12-10 18:04 ` Jason Rumney
2007-12-10 19:05 ` Dave Goel [this message]
2007-12-10 19:56 ` Andreas Schwab
2007-12-10 20:31 ` Dave Goel
2007-12-10 21:19 ` David Kastrup
2007-12-10 22:44 ` Dave Goel
2007-12-10 23:02 ` David Kastrup
2007-12-08 19:15 ` Richard Stallman
2007-12-07 17:18 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877ijmmkuq.fsf@marie.gnufans.net \
--to=deego3@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=jasonr@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.