aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann1999-07-21 21:43:52 +0000
committerGerd Moellmann1999-07-21 21:43:52 +0000
commit7eb0330213eae25cac6204a2c97a737e7c501bf8 (patch)
tree194590e6284d6ab634f9d9ac75572f36b4594562 /src
parent90d920b6076f7ad1d41091e7c16274efbb75dd07 (diff)
downloademacs-7eb0330213eae25cac6204a2c97a737e7c501bf8.tar.gz
emacs-7eb0330213eae25cac6204a2c97a737e7c501bf8.zip
(print): Add hash table handling.
(printchar): Set echo_area_message to nil. (strout): Ditto.
Diffstat (limited to 'src')
-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)
399 { 399 {
400 message_log_maybe_newline (); 400 message_log_maybe_newline ();
401 echo_area_glyphs = FRAME_MESSAGE_BUF (mini_frame); 401 echo_area_glyphs = FRAME_MESSAGE_BUF (mini_frame);
402 echo_area_message = Qnil;
402 printbufidx = 0; 403 printbufidx = 0;
403 echo_area_glyphs_length = 0; 404 echo_area_glyphs_length = 0;
404 message_buf_print = 1; 405 message_buf_print = 1;
@@ -527,6 +528,7 @@ strout (ptr, size, size_byte, printcharfun, multibyte)
527 { 528 {
528 message_log_maybe_newline (); 529 message_log_maybe_newline ();
529 echo_area_glyphs = FRAME_MESSAGE_BUF (mini_frame); 530 echo_area_glyphs = FRAME_MESSAGE_BUF (mini_frame);
531 echo_area_message = Qnil;
530 printbufidx = 0; 532 printbufidx = 0;
531 echo_area_glyphs_length = 0; 533 echo_area_glyphs_length = 0;
532 message_buf_print = 1; 534 message_buf_print = 1;
@@ -1616,6 +1618,26 @@ print (obj, printcharfun, escapeflag)
1616 } 1618 }
1617 PRINTCHAR ('>'); 1619 PRINTCHAR ('>');
1618 } 1620 }
1621 else if (HASH_TABLE_P (obj))
1622 {
1623 struct Lisp_Hash_Table *h = XHASH_TABLE (obj);
1624 strout ("#<hash-table", -1, -1, printcharfun, 0);
1625 if (SYMBOLP (h->test))
1626 {
1627 PRINTCHAR (' ');
1628 PRINTCHAR ('\'');
1629 strout (XSYMBOL (h->test)->name->data, -1, -1, printcharfun, 0);
1630 PRINTCHAR (' ');
1631 strout (XSYMBOL (h->weak)->name->data, -1, -1, printcharfun, 0);
1632 PRINTCHAR (' ');
1633 sprintf (buf, "%d/%d", XFASTINT (h->count),
1634 XVECTOR (h->next)->size);
1635 strout (buf, -1, -1, printcharfun, 0);
1636 }
1637 sprintf (buf, " 0x%lx", (unsigned long) h);
1638 strout (buf, -1, -1, printcharfun, 0);
1639 PRINTCHAR ('>');
1640 }
1619 else if (BUFFERP (obj)) 1641 else if (BUFFERP (obj))
1620 { 1642 {
1621 if (NILP (XBUFFER (obj)->name)) 1643 if (NILP (XBUFFER (obj)->name))