comparison src/specifier.c @ 371:cc15677e0335 r21-2b1

Import from CVS: tag r21-2b1
author cvs
date Mon, 13 Aug 2007 11:03:08 +0200
parents 7347b34c275b
children 8626e4521993
comparison
equal deleted inserted replaced
370:bd866891f083 371:cc15677e0335
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 "chartab.h" 40 #include "glyphs.h" /* for DISP_TABLE_SIZE definition */
41 #include "rangetab.h"
42 41
43 Lisp_Object Qspecifierp; 42 Lisp_Object Qspecifierp;
44 Lisp_Object Qprepend, Qappend, Qremove_tag_set_prepend, Qremove_tag_set_append; 43 Lisp_Object Qprepend, Qappend, Qremove_tag_set_prepend, Qremove_tag_set_append;
45 Lisp_Object Qremove_locale, Qremove_locale_type, Qremove_all; 44 Lisp_Object Qremove_locale, Qremove_locale_type, Qremove_all;
46 Lisp_Object Qfallback; 45 Lisp_Object Qfallback;
2993 /* Display table specifier type */ 2992 /* Display table specifier type */
2994 /************************************************************************/ 2993 /************************************************************************/
2995 2994
2996 DEFINE_SPECIFIER_TYPE (display_table); 2995 DEFINE_SPECIFIER_TYPE (display_table);
2997 2996
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
3005 static void 2997 static void
3006 display_table_validate (Lisp_Object instantiator) 2998 display_table_validate (Lisp_Object instantiator)
3007 { 2999 {
3008 if (NILP (instantiator)) 3000 if (!NILP(instantiator) &&
3009 /* OK */ 3001 (!VECTORP (instantiator) ||
3010 ; 3002 XVECTOR_LENGTH (instantiator) != DISP_TABLE_SIZE))
3011 else if (CONSP (instantiator)) 3003 dead_wrong_type_argument (display_table_specifier_methods->predicate_symbol,
3012 { 3004 instantiator);
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 }
3030 } 3005 }
3031 3006
3032 DEFUN ("display-table-specifier-p", Fdisplay_table_specifier_p, 1, 1, 0, /* 3007 DEFUN ("display-table-specifier-p", Fdisplay_table_specifier_p, 1, 1, 0, /*
3033 Return non-nil if OBJECT is a display-table specifier. 3008 Return non-nil if OBJECT is a display-table specifier.
3034 */ 3009 */