changeset 46572:765f9cd60063

(cmd_error_internal): Pass Vsignaling_function and CONTEXT to print_error_message, don't print them here. For a Quit, don't use Vsignaling_function. Call message_log_maybe_newline.
author Richard M. Stallman <rms@gnu.org>
date Sat, 20 Jul 2002 21:47:00 +0000
parents 00e7aef43c61
children 4de08f73c18e
files src/keyboard.c
diffstat 1 files changed, 11 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/src/keyboard.c	Sat Jul 20 21:45:25 2002 +0000
+++ b/src/keyboard.c	Sat Jul 20 21:47:00 2002 +0000
@@ -1202,24 +1202,19 @@
   else
     {
       Fdiscard_input ();
+      message_log_maybe_newline ();
       bitch_at_user ();
       stream = Qt;
-
-      /* If we know from where the error was signaled, show it in
-	 *Messages*.  */
-      if (!NILP (Vsignaling_function) && SYMBOLP (Vsignaling_function))
-	{
-	  const char *name = SDATA (SYMBOL_NAME (Vsignaling_function));
-	  message_dolog (name, strlen (name), 0, 0);
-	  message_dolog (": ", 2, 0, 0);
-	  Vsignaling_function = Qnil;
-	}
-    }
-
-  if (context != 0)
-    write_string_1 (context, -1, stream);
-
-  print_error_message (data, stream);
+    }
+
+  /* The immediate context is not interesting for Quits,
+     since they are asyncronous.  */
+  if (EQ (XCAR (data), Qquit))
+    Vsignaling_function = Qnil;
+  
+  print_error_message (data, stream, context, Vsignaling_function);
+
+  Vsignaling_function = Qnil;
 
   /* If the window system or terminal frame hasn't been initialized
      yet, or we're in -batch mode, this error should cause Emacs to exit.  */