changeset 10932:df11ec79623a

(cmd_error): Bind Vprint_level and Vprint_length.
author Karl Heuer <kwzh@gnu.org>
date Wed, 08 Mar 1995 00:45:37 +0000
parents 933a04abe0ac
children 3057c4fd86d3
files src/keyboard.c
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/keyboard.c	Tue Mar 07 15:24:44 1995 +0000
+++ b/src/keyboard.c	Wed Mar 08 00:45:37 1995 +0000
@@ -444,6 +444,8 @@
 
 Lisp_Object Qpolling_period;
 
+extern Lisp_Object Vprint_level, Vprint_length;
+
 /* Address (if not 0) of EMACS_TIME to zero out if a SIGIO interrupt
    happens.  */
 EMACS_TIME *input_available_clear_time;
@@ -765,6 +767,8 @@
 cmd_error (data)
      Lisp_Object data;
 {
+  Lisp_Object old_level, old_length;
+
   Vstandard_output = Qt;
   Vstandard_input = Qt;
   Vexecuting_macro = Qnil;
@@ -773,7 +777,15 @@
       clear_prefix_arg ();
       cancel_echoing ();
     }
+
+  /* Avoid unquittable loop if data contains a circular list.  */
+  old_level = Vprint_level;
+  old_length = Vprint_length;
+  XSETFASTINT(Vprint_level, 10);
+  XSETFASTINT(Vprint_length, 10);
   cmd_error_internal (data, 0);
+  Vprint_level = old_level;
+  Vprint_length = old_length;
 
   Vquit_flag = Qnil;