summaryrefslogtreecommitdiff
path: root/src
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
commitf76c8b1ef303f7294c0c4ef0ebe9f9032350ff65 (patch)
treeed61dd881afc2246c26adc34d90114ec24249dbe /src
parent49e49fb5dd6543c6c21c5a3d9045f3bf3adb55b3 (diff)
downloademacs-f76c8b1ef303f7294c0c4ef0ebe9f9032350ff65.tar.gz
(print_object): Handle terminals.
Diffstat (limited to 'src')
-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);