summaryrefslogtreecommitdiff
path: root/src/print.c
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>1999-07-21 21:43:52 +0000
committerGerd Moellmann <gerd@gnu.org>1999-07-21 21:43:52 +0000
commit7eb0330213eae25cac6204a2c97a737e7c501bf8 (patch)
tree194590e6284d6ab634f9d9ac75572f36b4594562 /src/print.c
parent90d920b6076f7ad1d41091e7c16274efbb75dd07 (diff)
downloademacs-7eb0330213eae25cac6204a2c97a737e7c501bf8.tar.gz
(print): Add hash table handling.
(printchar): Set echo_area_message to nil. (strout): Ditto.
Diffstat (limited to 'src/print.c')
-rw-r--r--src/print.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/print.c b/src/print.c
index 69a3d68f428..d3a7efc12c9 100644
--- a/src/print.c
+++ b/src/print.c
@@ -399,6 +399,7 @@ printchar (ch, fun)
{
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 @@ strout (ptr, size, size_byte, printcharfun, multibyte)
{
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 @@ print (obj, printcharfun, escapeflag)
}
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))