Mercurial > emacs
diff src/print.c @ 25011:12235d1f1871
(print): Add hash table handling.
(printchar): Set echo_area_message to nil.
(strout): Ditto.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Wed, 21 Jul 1999 21:43:52 +0000 |
parents | d4edd0f4edfa |
children | e25e953cfc58 |
line wrap: on
line diff
--- a/src/print.c Wed Jul 21 21:43:52 1999 +0000 +++ b/src/print.c Wed Jul 21 21:43:52 1999 +0000 @@ -399,6 +399,7 @@ { message_log_maybe_newline (); echo_area_glyphs = FRAME_MESSAGE_BUF (mini_frame); + echo_area_message = Qnil; printbufidx = 0; echo_area_glyphs_length = 0; message_buf_print = 1; @@ -527,6 +528,7 @@ { message_log_maybe_newline (); echo_area_glyphs = FRAME_MESSAGE_BUF (mini_frame); + echo_area_message = Qnil; printbufidx = 0; echo_area_glyphs_length = 0; message_buf_print = 1; @@ -1616,6 +1618,26 @@ } PRINTCHAR ('>'); } + else if (HASH_TABLE_P (obj)) + { + struct Lisp_Hash_Table *h = XHASH_TABLE (obj); + strout ("#<hash-table", -1, -1, printcharfun, 0); + if (SYMBOLP (h->test)) + { + PRINTCHAR (' '); + PRINTCHAR ('\''); + strout (XSYMBOL (h->test)->name->data, -1, -1, printcharfun, 0); + PRINTCHAR (' '); + strout (XSYMBOL (h->weak)->name->data, -1, -1, printcharfun, 0); + PRINTCHAR (' '); + sprintf (buf, "%d/%d", XFASTINT (h->count), + XVECTOR (h->next)->size); + strout (buf, -1, -1, printcharfun, 0); + } + sprintf (buf, " 0x%lx", (unsigned long) h); + strout (buf, -1, -1, printcharfun, 0); + PRINTCHAR ('>'); + } else if (BUFFERP (obj)) { if (NILP (XBUFFER (obj)->name))