Mercurial > emacs
changeset 46574:2f83f3473b40
(print_error_message): New args CONTEXT and CALLER. Calls changed.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 20 Jul 2002 21:48:27 +0000 |
parents | 4de08f73c18e |
children | 30fda32839de |
files | src/print.c |
diffstat | 1 files changed, 16 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/print.c Sat Jul 20 21:47:26 2002 +0000 +++ b/src/print.c Sat Jul 20 21:48:27 2002 +0000 @@ -920,7 +920,7 @@ && NILP (XCDR (XCDR (obj)))) return XCAR (XCDR (obj)); - print_error_message (obj, Vprin1_to_string_buffer); + print_error_message (obj, Vprin1_to_string_buffer, 0, Qnil); set_buffer_internal (XBUFFER (Vprin1_to_string_buffer)); value = Fbuffer_string (); @@ -937,13 +937,27 @@ STREAM (suitable for the print functions). */ void -print_error_message (data, stream) +print_error_message (data, stream, context, caller) Lisp_Object data, stream; + char *context; + Lisp_Object caller; { Lisp_Object errname, errmsg, file_error, tail; struct gcpro gcpro1; int i; + if (context != 0) + write_string_1 (context, -1, stream); + + /* If we know from where the error was signaled, show it in + *Messages*. */ + if (!NILP (caller) && SYMBOLP (caller)) + { + const char *name = SDATA (SYMBOL_NAME (caller)); + message_dolog (name, strlen (name), 0, 0); + message_dolog (": ", 2, 0, 0); + } + errname = Fcar (data); if (EQ (errname, Qerror))