]> git.eshelyaron.com Git - emacs.git/commitdiff
(print_object): Check print_depth before searching for circularities.
authorChong Yidong <cyd@stupidchicken.com>
Mon, 21 Jul 2008 05:05:56 +0000 (05:05 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Mon, 21 Jul 2008 05:05:56 +0000 (05:05 +0000)
src/print.c

index 88abdacfe60c2059f257aba1c687ac9b53cbaeb2..a474fa31e818b1ea0c4a00a217309e84a3239b03 100644 (file)
@@ -1487,6 +1487,10 @@ print_object (obj, printcharfun, escapeflag)
 
   QUIT;
 
+  /* See similar code in print_preprocess.  */
+  if (print_depth > PRINT_CIRCLE)
+    error ("Apparently circular structure being printed");
+
   /* Detect circularities and truncate them.  */
   if (STRINGP (obj) || CONSP (obj) || VECTORP (obj)
       || COMPILEDP (obj) || CHAR_TABLE_P (obj)
@@ -1537,9 +1541,6 @@ print_object (obj, printcharfun, escapeflag)
 
   print_depth++;
 
-  /* See similar code in print_preprocess.  */
-  if (print_depth > PRINT_CIRCLE)
-    error ("Apparently circular structure being printed");
 #ifdef MAX_PRINT_CHARS
   if (max_print && print_chars > max_print)
     {