changeset 84690:8ef41e809922

(print_object): Handle terminals.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 20 Sep 2007 21:24:47 +0000
parents 73c717fa7866
children 920b65c5b922
files src/print.c
diffstat 1 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/print.c	Thu Sep 20 21:24:14 2007 +0000
+++ b/src/print.c	Thu Sep 20 21:24:47 2007 +0000
@@ -34,6 +34,7 @@
 #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 @@
 	    }
 	  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);