diff options
| author | Chong Yidong | 2009-02-21 13:38:59 +0000 |
|---|---|---|
| committer | Chong Yidong | 2009-02-21 13:38:59 +0000 |
| commit | 4e6f26262ed77e778026dea784aae56a1cc3438c (patch) | |
| tree | 1f677a7afa84b7ae86eaa93a3f4d866ed4a693e3 /src/data.c | |
| parent | 0b6f228ca9b9d08e8326994b1b6bda75132711eb (diff) | |
| download | emacs-4e6f26262ed77e778026dea784aae56a1cc3438c.tar.gz emacs-4e6f26262ed77e778026dea784aae56a1cc3438c.zip | |
(syms_of_data): Define Qfont_spec, Qfont_entity, and
Qfont_object.
(Ftype_of): Recognize font objects.
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/data.c b/src/data.c index bf3fb91fcc3..6221b787608 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -30,6 +30,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 30 | #include "frame.h" | 30 | #include "frame.h" |
| 31 | #include "syssignal.h" | 31 | #include "syssignal.h" |
| 32 | #include "termhooks.h" /* For FRAME_KBOARD reference in y-or-n-p. */ | 32 | #include "termhooks.h" /* For FRAME_KBOARD reference in y-or-n-p. */ |
| 33 | #include "font.h" | ||
| 33 | 34 | ||
| 34 | #ifdef STDC_HEADERS | 35 | #ifdef STDC_HEADERS |
| 35 | #include <float.h> | 36 | #include <float.h> |
| @@ -85,6 +86,7 @@ Lisp_Object Qprocess; | |||
| 85 | static Lisp_Object Qcompiled_function, Qbuffer, Qframe, Qvector; | 86 | static Lisp_Object Qcompiled_function, Qbuffer, Qframe, Qvector; |
| 86 | static Lisp_Object Qchar_table, Qbool_vector, Qhash_table; | 87 | static Lisp_Object Qchar_table, Qbool_vector, Qhash_table; |
| 87 | static Lisp_Object Qsubrp, Qmany, Qunevalled; | 88 | static Lisp_Object Qsubrp, Qmany, Qunevalled; |
| 89 | Lisp_Object Qfont_spec, Qfont_entity, Qfont_object; | ||
| 88 | 90 | ||
| 89 | static Lisp_Object swap_in_symval_forwarding P_ ((Lisp_Object, Lisp_Object)); | 91 | static Lisp_Object swap_in_symval_forwarding P_ ((Lisp_Object, Lisp_Object)); |
| 90 | 92 | ||
| @@ -224,6 +226,12 @@ for example, (type-of 1) returns `integer'. */) | |||
| 224 | return Qframe; | 226 | return Qframe; |
| 225 | if (HASH_TABLE_P (object)) | 227 | if (HASH_TABLE_P (object)) |
| 226 | return Qhash_table; | 228 | return Qhash_table; |
| 229 | if (FONT_SPEC_P (object)) | ||
| 230 | return Qfont_spec; | ||
| 231 | if (FONT_ENTITY_P (object)) | ||
| 232 | return Qfont_entity; | ||
| 233 | if (FONT_OBJECT_P (object)) | ||
| 234 | return Qfont_object; | ||
| 227 | return Qvector; | 235 | return Qvector; |
| 228 | 236 | ||
| 229 | case Lisp_Float: | 237 | case Lisp_Float: |
| @@ -3140,6 +3148,10 @@ syms_of_data () | |||
| 3140 | Qbool_vector = intern ("bool-vector"); | 3148 | Qbool_vector = intern ("bool-vector"); |
| 3141 | Qhash_table = intern ("hash-table"); | 3149 | Qhash_table = intern ("hash-table"); |
| 3142 | 3150 | ||
| 3151 | DEFSYM (Qfont_spec, "font-spec"); | ||
| 3152 | DEFSYM (Qfont_entity, "font-entity"); | ||
| 3153 | DEFSYM (Qfont_object, "font-object"); | ||
| 3154 | |||
| 3143 | staticpro (&Qinteger); | 3155 | staticpro (&Qinteger); |
| 3144 | staticpro (&Qsymbol); | 3156 | staticpro (&Qsymbol); |
| 3145 | staticpro (&Qstring); | 3157 | staticpro (&Qstring); |