# HG changeset patch # User Gerd Moellmann # Date 956832465 0 # Node ID e5694cf2ac01f0c40eee215739344c745e07b499 # Parent 2e0946b26643dbf65009018a45371b98c07333dc (print_error_message): Print data of `end-of-file' with Fprinc instead of Fprin1. diff -r 2e0946b26643 -r e5694cf2ac01 src/print.c --- 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