Mercurial > emacs
comparison src/print.c @ 84690:8ef41e809922
(print_object): Handle terminals.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Thu, 20 Sep 2007 21:24:47 +0000 |
parents | 5b644ae74c91 |
children | db5465b7ec88 |
comparison
equal
deleted
inserted
replaced
84689:73c717fa7866 | 84690:8ef41e809922 |
---|---|
32 #include "process.h" | 32 #include "process.h" |
33 #include "dispextern.h" | 33 #include "dispextern.h" |
34 #include "termchar.h" | 34 #include "termchar.h" |
35 #include "intervals.h" | 35 #include "intervals.h" |
36 #include "blockinput.h" | 36 #include "blockinput.h" |
37 #include "termhooks.h" /* For struct terminal. */ | |
37 | 38 |
38 Lisp_Object Vstandard_output, Qstandard_output; | 39 Lisp_Object Vstandard_output, Qstandard_output; |
39 | 40 |
40 Lisp_Object Qtemp_buffer_setup_hook; | 41 Lisp_Object Qtemp_buffer_setup_hook; |
41 | 42 |
1963 strout (" on ", -1, -1, printcharfun, 0); | 1964 strout (" on ", -1, -1, printcharfun, 0); |
1964 print_string (XBUFFER (XWINDOW (obj)->buffer)->name, printcharfun); | 1965 print_string (XBUFFER (XWINDOW (obj)->buffer)->name, printcharfun); |
1965 } | 1966 } |
1966 PRINTCHAR ('>'); | 1967 PRINTCHAR ('>'); |
1967 } | 1968 } |
1969 else if (TERMINALP (obj)) | |
1970 { | |
1971 struct terminal *t = XTERMINAL (obj); | |
1972 strout ("#<terminal ", -1, -1, printcharfun, 0); | |
1973 sprintf (buf, "%d", t->id); | |
1974 strout (buf, -1, -1, printcharfun, 0); | |
1975 if (t->name) | |
1976 { | |
1977 strout (" on ", -1, -1, printcharfun, 0); | |
1978 strout (t->name, -1, -1, printcharfun, 0); | |
1979 } | |
1980 PRINTCHAR ('>'); | |
1981 } | |
1968 else if (HASH_TABLE_P (obj)) | 1982 else if (HASH_TABLE_P (obj)) |
1969 { | 1983 { |
1970 struct Lisp_Hash_Table *h = XHASH_TABLE (obj); | 1984 struct Lisp_Hash_Table *h = XHASH_TABLE (obj); |
1971 strout ("#<hash-table", -1, -1, printcharfun, 0); | 1985 strout ("#<hash-table", -1, -1, printcharfun, 0); |
1972 if (SYMBOLP (h->test)) | 1986 if (SYMBOLP (h->test)) |