diff options
Diffstat (limited to 'src/print.c')
-rw-r--r-- | src/print.c | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/src/print.c b/src/print.c index 86fd93a5b3..edd22abc03 100644 --- a/src/print.c +++ b/src/print.c @@ -35,6 +35,7 @@ Boston, MA 02110-1301, USA. */ #include "termchar.h" #include "intervals.h" #include "blockinput.h" +#include "termhooks.h" /* For struct terminal. */ Lisp_Object Vstandard_output, Qstandard_output; @@ -1024,11 +1025,7 @@ safe_debug_print (arg) else fprintf (stderr, "#<%s_LISP_OBJECT 0x%08lx>\r\n", !valid ? "INVALID" : "SOME", -#ifdef NO_UNION_TYPE - (unsigned long) arg -#else - (unsigned long) arg.i -#endif + (unsigned long) XHASH (arg) ); } @@ -1388,10 +1385,10 @@ print_preprocess (obj) for (i = 0; i < print_number_index; i++) if (EQ (PRINT_NUMBER_OBJECT (Vprint_number_table, i), obj)) { - /* OBJ appears more than once. Let's remember that. */ + /* OBJ appears more than once. Let's remember that. */ PRINT_NUMBER_STATUS (Vprint_number_table, i) = Qt; print_depth--; - return; + return; } /* OBJ is not yet recorded. Let's add to the table. */ @@ -2063,6 +2060,19 @@ print_object (obj, printcharfun, escapeflag) } PRINTCHAR ('>'); } + else if (TERMINALP (obj)) + { + struct terminal *t = XTERMINAL (obj); + strout ("#<terminal ", -1, -1, printcharfun, 0); + sprintf (buf, "%d", t->id); + strout (buf, -1, -1, printcharfun, 0); + if (t->name) + { + strout (" on ", -1, -1, printcharfun, 0); + strout (t->name, -1, -1, printcharfun, 0); + } + PRINTCHAR ('>'); + } else if (HASH_TABLE_P (obj)) { struct Lisp_Hash_Table *h = XHASH_TABLE (obj); @@ -2075,7 +2085,7 @@ print_object (obj, printcharfun, escapeflag) PRINTCHAR (' '); strout (SDATA (SYMBOL_NAME (h->weak)), -1, -1, printcharfun, 0); PRINTCHAR (' '); - sprintf (buf, "%ld/%ld", (long) XFASTINT (h->count), + sprintf (buf, "%ld/%ld", (long) h->count, (long) XVECTOR (h->next)->size); strout (buf, -1, -1, printcharfun, 0); } |