Mercurial > emacs
changeset 28732:e5694cf2ac01
(print_error_message): Print data of `end-of-file'
with Fprinc instead of Fprin1.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Thu, 27 Apr 2000 10:47:45 +0000 |
parents | 2e0946b26643 |
children | 3234d64a07bf |
files | src/print.c |
diffstat | 1 files changed, 17 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/print.c Thu Apr 27 10:41:43 2000 +0000 +++ b/src/print.c Thu Apr 27 10:47:45 2000 +0000 @@ -858,8 +858,8 @@ return value; } -/* Print an error message for the error DATA - onto Lisp output stream STREAM (suitable for the print functions). */ +/* Print an error message for the error DATA onto Lisp output stream + STREAM (suitable for the print functions). */ void print_error_message (data, stream) @@ -874,15 +874,17 @@ if (EQ (errname, Qerror)) { data = Fcdr (data); - if (!CONSP (data)) data = Qnil; + if (!CONSP (data)) + data = Qnil; errmsg = Fcar (data); file_error = Qnil; } else { + Lisp_Object error_conditions; errmsg = Fget (errname, Qerror_message); - file_error = Fmemq (Qfile_error, - Fget (errname, Qerror_conditions)); + error_conditions = Fget (errname, Qerror_conditions); + file_error = Fmemq (Qfile_error, error_conditions); } /* Print an error message including the data items. */ @@ -900,18 +902,23 @@ else write_string_1 ("peculiar error", -1, stream); - for (i = 0; CONSP (tail); tail = Fcdr (tail), i++) + for (i = 0; CONSP (tail); tail = XCDR (tail), i++) { + Lisp_Object obj; + write_string_1 (i ? ", " : ": ", 2, stream); - if (!NILP (file_error)) - Fprinc (Fcar (tail), stream); + obj = XCAR (tail); + if (!NILP (file_error) || EQ (errname, Qend_of_file)) + Fprinc (obj, stream); else - Fprin1 (Fcar (tail), stream); + Fprin1 (obj, stream); } + UNGCPRO; } + + - /* * The buffer should be at least as large as the max string size of the * largest float, printed in the biggest notation. This is undoubtedly