aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2008-05-14 01:39:58 +0000
committerKenichi Handa2008-05-14 01:39:58 +0000
commit2a7b7982aea93d5bac211492b057b78f3c7ba261 (patch)
tree9e0b7430bcab1775dd71326ec6cc25deeedff9b2
parentf85064bdd8157a98cdd96270df5721bade59af68 (diff)
downloademacs-2a7b7982aea93d5bac211492b057b78f3c7ba261.tar.gz
emacs-2a7b7982aea93d5bac211492b057b78f3c7ba261.zip
Include font.h.
(print_object): Handle font-related objects.
-rw-r--r--src/print.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/print.c b/src/print.c
index d5453ce74ef..82c987a85dd 100644
--- a/src/print.c
+++ b/src/print.c
@@ -36,6 +36,7 @@ Boston, MA 02110-1301, USA. */
36#include "intervals.h" 36#include "intervals.h"
37#include "blockinput.h" 37#include "blockinput.h"
38#include "termhooks.h" /* For struct terminal. */ 38#include "termhooks.h" /* For struct terminal. */
39#include "font.h"
39 40
40Lisp_Object Vstandard_output, Qstandard_output; 41Lisp_Object Vstandard_output, Qstandard_output;
41 42
@@ -2129,6 +2130,34 @@ print_object (obj, printcharfun, escapeflag)
2129 strout (buf, -1, -1, printcharfun, 0); 2130 strout (buf, -1, -1, printcharfun, 0);
2130 PRINTCHAR ('>'); 2131 PRINTCHAR ('>');
2131 } 2132 }
2133 else if (FONTP (obj))
2134 {
2135 EMACS_INT i;
2136
2137 if (! FONT_OBJECT_P (obj))
2138 {
2139 if (FONT_SPEC_P (obj))
2140 strout ("#<font-spec", -1, -1, printcharfun, 0);
2141 else
2142 strout ("#<font-entity", -1, -1, printcharfun, 0);
2143 for (i = 0; i < FONT_SPEC_MAX; i++)
2144 {
2145 PRINTCHAR (' ');
2146 if (i < FONT_WEIGHT_INDEX || i > FONT_WIDTH_INDEX)
2147 print_object (AREF (obj, i), printcharfun, escapeflag);
2148 else
2149 print_object (font_style_symbolic (obj, i, 0),
2150 printcharfun, escapeflag);
2151 }
2152 }
2153 else
2154 {
2155 strout ("#<font-object ", -1, -1, printcharfun, 0);
2156 print_object (AREF (obj, FONT_NAME_INDEX), printcharfun,
2157 escapeflag);
2158 }
2159 PRINTCHAR ('>');
2160 }
2132 else 2161 else
2133 { 2162 {
2134 EMACS_INT size = XVECTOR (obj)->size; 2163 EMACS_INT size = XVECTOR (obj)->size;