Subject: Re: bug#2866: 23.0.91; "(princ (category-table) (current-buffer))" causes emacs to hang

From: Kenichi Handa <[email-masked]>
Date: Fri, 03 Apr 2009 10:53:34 +0900

In article <[email-masked]>, MON KEY <[email-masked]> writes:

> evaluating:
> (princ (category-table) (current-buffer))
> Causes emacs to hang.

> Whether this is a useful way to examine the category-table is another
> question entirely :P

It doesn't hang Emacs for me but takes long time in
redisplay.  It's because of the extremely long line.

If it is ok to terminate lines within the printing of a
object, something like this change will speed up the
redisplay.

--- print.c.~1.255.~	2009-01-16 15:52:25.000000000 +0900
+++ print.c	2009-04-03 10:44:14.000000000 +0900
@@ -2116,6 +2116,9 @@
 	      /* We print a char-table as if it were a vector,
 		 lumping the parent and default slots in with the
 		 character slots.  But we add #^ as a prefix.  */
+	      if (SUB_CHAR_TABLE_P (obj)
+		  && XINT (XSUB_CHAR_TABLE (obj)->depth) == 3)
+		PRINTCHAR ('\n');
 	      PRINTCHAR ('#');
 	      PRINTCHAR ('^');
 	      if (SUB_CHAR_TABLE_P (obj))

---
Kenichi Handa
[email-masked]