comparison src/specifier.c @ 384:bbff43aa5eb7 r21-2-7

Import from CVS: tag r21-2-7
author cvs
date Mon, 13 Aug 2007 11:08:24 +0200
parents 8626e4521993
children 74fd4e045ea6
comparison
equal deleted inserted replaced
383:6a50c6a581a5 384:bbff43aa5eb7
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;
2996 /* Display table specifier type */ 2997 /* Display table specifier type */
2997 /************************************************************************/ 2998 /************************************************************************/
2998 2999
2999 DEFINE_SPECIFIER_TYPE (display_table); 3000 DEFINE_SPECIFIER_TYPE (display_table);
3000 3001
3002 #define VALID_SINGLE_DISPTABLE_INSTANTIATOR_P(instantiator) \
3003 (VECTORP (instantiator) \
3004 || (CHAR_TABLEP (instantiator) \
3005 && (XCHAR_TABLE_TYPE (instantiator) == CHAR_TABLE_TYPE_CHAR \
3006 || XCHAR_TABLE_TYPE (instantiator) == CHAR_TABLE_TYPE_GENERIC)) \
3007 || RANGE_TABLEP (instantiator))
3008
3001 static void 3009 static void
3002 display_table_validate (Lisp_Object instantiator) 3010 display_table_validate (Lisp_Object instantiator)
3003 { 3011 {
3004 if (!NILP(instantiator) && 3012 if (NILP (instantiator))
3005 (!VECTORP (instantiator) || 3013 /* OK */
3006 XVECTOR_LENGTH (instantiator) != DISP_TABLE_SIZE)) 3014 ;
3007 dead_wrong_type_argument (display_table_specifier_methods->predicate_symbol, 3015 else if (CONSP (instantiator))
3008 instantiator); 3016 {
3017 Lisp_Object tail;
3018 EXTERNAL_LIST_LOOP (tail, instantiator)
3019 {
3020 Lisp_Object car = XCAR (tail);
3021 if (!VALID_SINGLE_DISPTABLE_INSTANTIATOR_P (car))
3022 goto lose;
3023 }
3024 }
3025 else
3026 {
3027 if (!VALID_SINGLE_DISPTABLE_INSTANTIATOR_P (instantiator))
3028 {
3029 lose:
3030 dead_wrong_type_argument (display_table_specifier_methods->predicate_symbol,
3031 instantiator);
3032 }
3033 }
3009 } 3034 }
3010 3035
3011 DEFUN ("display-table-specifier-p", Fdisplay_table_specifier_p, 1, 1, 0, /* 3036 DEFUN ("display-table-specifier-p", Fdisplay_table_specifier_p, 1, 1, 0, /*
3012 Return non-nil if OBJECT is a display-table specifier. 3037 Return non-nil if OBJECT is a display-table specifier.
3013 */ 3038 */