summaryrefslogtreecommitdiff
path: root/src/print.c
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2007-09-20 21:24:47 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2007-09-20 21:24:47 +0000
commite6ab38fe89f001db7bd76ced458918ea919fceb9 (patch)
tree633c426b6af2342c3fc5faf26fe193f953e9ba26 /src/print.c
parentb1cb896a9406901979a1b18c4aa247fd8391b77e (diff)
downloademacs-e6ab38fe89f001db7bd76ced458918ea919fceb9.tar.gz
(print_object): Handle terminals.
Diffstat (limited to 'src/print.c')
-rw-r--r--src/print.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/print.c b/src/print.c
index cd3d6438bff..a14c041d6a2 100644
--- a/src/print.c
+++ b/src/print.c
@@ -34,6 +34,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;
@@ -1965,6 +1966,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);