Mercurial > hg > xemacs-beta
comparison src/specifier.c @ 361:7347b34c275b r21-1-10
Import from CVS: tag r21-1-10
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:58:40 +0200 |
parents | 558f606b08ae |
children | cc15677e0335 |
comparison
equal
deleted
inserted
replaced
360:0f00b38cfccb | 361:7347b34c275b |
---|---|
35 #include "device.h" | 35 #include "device.h" |
36 #include "frame.h" | 36 #include "frame.h" |
37 #include "opaque.h" | 37 #include "opaque.h" |
38 #include "specifier.h" | 38 #include "specifier.h" |
39 #include "window.h" | 39 #include "window.h" |
40 #include "glyphs.h" /* for DISP_TABLE_SIZE definition */ | 40 #include "chartab.h" |
41 #include "rangetab.h" | |
41 | 42 |
42 Lisp_Object Qspecifierp; | 43 Lisp_Object Qspecifierp; |
43 Lisp_Object Qprepend, Qappend, Qremove_tag_set_prepend, Qremove_tag_set_append; | 44 Lisp_Object Qprepend, Qappend, Qremove_tag_set_prepend, Qremove_tag_set_append; |
44 Lisp_Object Qremove_locale, Qremove_locale_type, Qremove_all; | 45 Lisp_Object Qremove_locale, Qremove_locale_type, Qremove_all; |
45 Lisp_Object Qfallback; | 46 Lisp_Object Qfallback; |
2992 /* Display table specifier type */ | 2993 /* Display table specifier type */ |
2993 /************************************************************************/ | 2994 /************************************************************************/ |
2994 | 2995 |
2995 DEFINE_SPECIFIER_TYPE (display_table); | 2996 DEFINE_SPECIFIER_TYPE (display_table); |
2996 | 2997 |
2998 #define VALID_SINGLE_DISPTABLE_INSTANTIATOR_P(instantiator) \ | |
2999 (VECTORP (instantiator) \ | |
3000 || (CHAR_TABLEP (instantiator) \ | |
3001 && (XCHAR_TABLE_TYPE (instantiator) == CHAR_TABLE_TYPE_CHAR \ | |
3002 || XCHAR_TABLE_TYPE (instantiator) == CHAR_TABLE_TYPE_GENERIC)) \ | |
3003 || RANGE_TABLEP (instantiator)) | |
3004 | |
2997 static void | 3005 static void |
2998 display_table_validate (Lisp_Object instantiator) | 3006 display_table_validate (Lisp_Object instantiator) |
2999 { | 3007 { |
3000 if (!NILP(instantiator) && | 3008 if (NILP (instantiator)) |
3001 (!VECTORP (instantiator) || | 3009 /* OK */ |
3002 XVECTOR_LENGTH (instantiator) != DISP_TABLE_SIZE)) | 3010 ; |
3003 dead_wrong_type_argument (display_table_specifier_methods->predicate_symbol, | 3011 else if (CONSP (instantiator)) |
3004 instantiator); | 3012 { |
3013 Lisp_Object tail; | |
3014 EXTERNAL_LIST_LOOP (tail, instantiator) | |
3015 { | |
3016 Lisp_Object car = XCAR (tail); | |
3017 if (!VALID_SINGLE_DISPTABLE_INSTANTIATOR_P (car)) | |
3018 goto lose; | |
3019 } | |
3020 } | |
3021 else | |
3022 { | |
3023 if (!VALID_SINGLE_DISPTABLE_INSTANTIATOR_P (instantiator)) | |
3024 { | |
3025 lose: | |
3026 dead_wrong_type_argument (display_table_specifier_methods->predicate_symbol, | |
3027 instantiator); | |
3028 } | |
3029 } | |
3005 } | 3030 } |
3006 | 3031 |
3007 DEFUN ("display-table-specifier-p", Fdisplay_table_specifier_p, 1, 1, 0, /* | 3032 DEFUN ("display-table-specifier-p", Fdisplay_table_specifier_p, 1, 1, 0, /* |
3008 Return non-nil if OBJECT is a display-table specifier. | 3033 Return non-nil if OBJECT is a display-table specifier. |
3009 */ | 3034 */ |