comparison src/specifier.c @ 173:8eaf7971accc r20-3b13

Import from CVS: tag r20-3b13
author cvs
date Mon, 13 Aug 2007 09:49:09 +0200
parents 15872534500d
children 2d532a89d707
comparison
equal deleted inserted replaced
172:a38aed19690b 173:8eaf7971accc
146 146
147 for (rest = Vall_specifiers; 147 for (rest = Vall_specifiers;
148 !NILP (rest); 148 !NILP (rest);
149 rest = XSPECIFIER (rest)->next_specifier) 149 rest = XSPECIFIER (rest)->next_specifier)
150 { 150 {
151 struct Lisp_Specifier *sp = XSPECIFIER (rest); 151 struct Lisp_Specifier *sp = XSPECIFIER (rest);
152 /* This effectively changes the specifier specs. 152 /* This effectively changes the specifier specs.
153 However, there's no need to call 153 However, there's no need to call
154 recompute_cached_specifier_everywhere() or the 154 recompute_cached_specifier_everywhere() or the
155 after-change methods because the only specs we 155 after-change methods because the only specs we
156 are removing are for dead objects, and they can 156 are removing are for dead objects, and they can
596 if (EQ (locale_type, Qglobal)) return LOCALE_GLOBAL; 596 if (EQ (locale_type, Qglobal)) return LOCALE_GLOBAL;
597 if (EQ (locale_type, Qdevice)) return LOCALE_DEVICE; 597 if (EQ (locale_type, Qdevice)) return LOCALE_DEVICE;
598 if (EQ (locale_type, Qframe)) return LOCALE_FRAME; 598 if (EQ (locale_type, Qframe)) return LOCALE_FRAME;
599 if (EQ (locale_type, Qwindow)) return LOCALE_WINDOW; 599 if (EQ (locale_type, Qwindow)) return LOCALE_WINDOW;
600 if (EQ (locale_type, Qbuffer)) return LOCALE_BUFFER; 600 if (EQ (locale_type, Qbuffer)) return LOCALE_BUFFER;
601 601
602 signal_simple_error ("Invalid specifier locale type", locale_type); 602 signal_simple_error ("Invalid specifier locale type", locale_type);
603 return LOCALE_GLOBAL; /* not reached */ 603 return LOCALE_GLOBAL; /* not reached */
604 } 604 }
605 605
606 Lisp_Object 606 Lisp_Object
730 tags = (Lisp_Object *) alloca (len * sizeof (Lisp_Object)); 730 tags = (Lisp_Object *) alloca (len * sizeof (Lisp_Object));
731 731
732 i = 0; 732 i = 0;
733 LIST_LOOP (rest, tag_set) 733 LIST_LOOP (rest, tag_set)
734 tags[i++] = XCAR (rest); 734 tags[i++] = XCAR (rest);
735 735
736 /* Sort the list of tags. We use a bubble sort here (copied from 736 /* Sort the list of tags. We use a bubble sort here (copied from
737 extent_fragment_update()) -- reduces the function call overhead, 737 extent_fragment_update()) -- reduces the function call overhead,
738 and is the fastest sort for small numbers of items. */ 738 and is the fastest sort for small numbers of items. */
739 739
740 for (i = 1; i < len; i++) 740 for (i = 1; i < len; i++)
894 { 894 {
895 Lisp_Object rest, rest2; 895 Lisp_Object rest, rest2;
896 Lisp_Object device = Qnil; 896 Lisp_Object device = Qnil;
897 897
898 XSETDEVICE (device, d); 898 XSETDEVICE (device, d);
899 899
900 DEVICE_USER_DEFINED_TAGS (d) = Fcopy_alist (Vuser_defined_tags); 900 DEVICE_USER_DEFINED_TAGS (d) = Fcopy_alist (Vuser_defined_tags);
901 901
902 /* Now set up the initial values */ 902 /* Now set up the initial values */
903 LIST_LOOP (rest, DEVICE_USER_DEFINED_TAGS (d)) 903 LIST_LOOP (rest, DEVICE_USER_DEFINED_TAGS (d))
904 XCDR (XCAR (rest)) = Qt; 904 XCDR (XCAR (rest)) = Qt;
921 (device)) 921 (device))
922 { 922 {
923 struct device *d = decode_device (device); 923 struct device *d = decode_device (device);
924 Lisp_Object rest, list = Qnil; 924 Lisp_Object rest, list = Qnil;
925 struct gcpro gcpro1; 925 struct gcpro gcpro1;
926 926
927 GCPRO1 (list); 927 GCPRO1 (list);
928 928
929 LIST_LOOP (rest, DEVICE_USER_DEFINED_TAGS (d)) 929 LIST_LOOP (rest, DEVICE_USER_DEFINED_TAGS (d))
930 { 930 {
931 if (!NILP (XCDR (XCAR (rest)))) 931 if (!NILP (XCDR (XCAR (rest))))
975 975
976 if (valid_console_type_p (tag)) 976 if (valid_console_type_p (tag))
977 return list3 (Qlambda, list1 (Qdevice), 977 return list3 (Qlambda, list1 (Qdevice),
978 list3 (Qeq, list2 (Qquote, tag), 978 list3 (Qeq, list2 (Qquote, tag),
979 list2 (Qconsole_type, Qdevice))); 979 list2 (Qconsole_type, Qdevice)));
980 980
981 if (valid_device_class_p (tag)) 981 if (valid_device_class_p (tag))
982 return list3 (Qlambda, list1 (Qdevice), 982 return list3 (Qlambda, list1 (Qdevice),
983 list3 (Qeq, list2 (Qquote, tag), 983 list3 (Qeq, list2 (Qquote, tag),
984 list2 (Qdevice_class, Qdevice))); 984 list2 (Qdevice_class, Qdevice)));
985 985
997 { 997 {
998 if (EQ (XCAR (a), XCAR (b))) 998 if (EQ (XCAR (a), XCAR (b)))
999 a = XCDR (a); 999 a = XCDR (a);
1000 b = XCDR (b); 1000 b = XCDR (b);
1001 } 1001 }
1002 1002
1003 return NILP (a); 1003 return NILP (a);
1004 } 1004 }
1005 else 1005 else
1006 { 1006 {
1007 while (!NILP (a) && !NILP (b)) 1007 while (!NILP (a) && !NILP (b))
1050 1050
1051 GCPRO1 (opaque); 1051 GCPRO1 (opaque);
1052 retval = call_with_suspended_errors 1052 retval = call_with_suspended_errors
1053 ((lisp_fn_t) call_validate_method, 1053 ((lisp_fn_t) call_validate_method,
1054 Qnil, Qspecifier, errb, 2, opaque, instantiator); 1054 Qnil, Qspecifier, errb, 2, opaque, instantiator);
1055 1055
1056 free_opaque_ptr (opaque); 1056 free_opaque_ptr (opaque);
1057 UNGCPRO; 1057 UNGCPRO;
1058 } 1058 }
1059 1059
1060 return retval; 1060 return retval;
1220 : (type == LOCALE_WINDOW \ 1220 : (type == LOCALE_WINDOW \
1221 ? &(XWEAK_LIST_LIST (XSPECIFIER (specifier)->window_specs)) \ 1221 ? &(XWEAK_LIST_LIST (XSPECIFIER (specifier)->window_specs)) \
1222 : (type == LOCALE_BUFFER \ 1222 : (type == LOCALE_BUFFER \
1223 ? &(XSPECIFIER (specifier)->buffer_specs) \ 1223 ? &(XSPECIFIER (specifier)->buffer_specs) \
1224 : 0))))) 1224 : 0)))))
1225 1225
1226 static Lisp_Object * 1226 static Lisp_Object *
1227 specifier_get_inst_list (Lisp_Object specifier, Lisp_Object locale, 1227 specifier_get_inst_list (Lisp_Object specifier, Lisp_Object locale,
1228 enum spec_locale_type type) 1228 enum spec_locale_type type)
1229 { 1229 {
1230 Lisp_Object *spec_list = SPECIFIER_GET_SPEC_LIST (specifier, type); 1230 Lisp_Object *spec_list = SPECIFIER_GET_SPEC_LIST (specifier, type);
1400 &was_removed); 1400 &was_removed);
1401 if (NILP (XCDR (assoc))) 1401 if (NILP (XCDR (assoc)))
1402 /* no inst-pairs left; remove this locale entirely. */ 1402 /* no inst-pairs left; remove this locale entirely. */
1403 *spec_list = remassq_no_quit (locale, *spec_list); 1403 *spec_list = remassq_no_quit (locale, *spec_list);
1404 } 1404 }
1405 1405
1406 if (was_removed) 1406 if (was_removed)
1407 MAYBE_SPECMETH (XSPECIFIER (specifier), after_change, (specifier, locale)); 1407 MAYBE_SPECMETH (XSPECIFIER (specifier), after_change, (specifier, locale));
1408 } 1408 }
1409 1409
1410 static void 1410 static void
1419 LIST_LOOP (rest, *spec_list) 1419 LIST_LOOP (rest, *spec_list)
1420 { 1420 {
1421 int was_removed; 1421 int was_removed;
1422 int remove_spec = 0; 1422 int remove_spec = 0;
1423 Lisp_Object spec = XCAR (rest); 1423 Lisp_Object spec = XCAR (rest);
1424 1424
1425 /* There may be dead objects floating around */ 1425 /* There may be dead objects floating around */
1426 /* remember, dead windows can become alive again. */ 1426 /* remember, dead windows can become alive again. */
1427 if (!WINDOWP (XCAR (spec)) && object_dead_p (XCAR (spec))) 1427 if (!WINDOWP (XCAR (spec)) && object_dead_p (XCAR (spec)))
1428 { 1428 {
1429 remove_spec = 1; 1429 remove_spec = 1;
1592 { 1592 {
1593 *orig_inst_list = nconc2 (*orig_inst_list, list_to_build_up); 1593 *orig_inst_list = nconc2 (*orig_inst_list, list_to_build_up);
1594 } 1594 }
1595 else 1595 else
1596 abort (); 1596 abort ();
1597 1597
1598 UNGCPRO; 1598 UNGCPRO;
1599 1599
1600 /* call the after-change method */ 1600 /* call the after-change method */
1601 MAYBE_SPECMETH (sp, after_change, (specifier, locale)); 1601 MAYBE_SPECMETH (sp, after_change, (specifier, locale));
1602 } 1602 }
1623 Lisp_Object rest; 1623 Lisp_Object rest;
1624 1624
1625 /* This algorithm is O(n^2) in running time. 1625 /* This algorithm is O(n^2) in running time.
1626 It's certainly possible to implement an O(n log n) algorithm, 1626 It's certainly possible to implement an O(n log n) algorithm,
1627 but I doubt there's any need to. */ 1627 but I doubt there's any need to. */
1628 1628
1629 LIST_LOOP (rest, *src_list) 1629 LIST_LOOP (rest, *src_list)
1630 { 1630 {
1631 Lisp_Object spec = XCAR (rest); 1631 Lisp_Object spec = XCAR (rest);
1632 /* There may be dead objects floating around */ 1632 /* There may be dead objects floating around */
1633 /* remember, dead windows can become alive again. */ 1633 /* remember, dead windows can become alive again. */
1635 specifier_add_spec 1635 specifier_add_spec
1636 (dest, XCAR (spec), 1636 (dest, XCAR (spec),
1637 specifier_process_inst_list (XCDR (spec), tag_set, exact_p, 0, 0), 1637 specifier_process_inst_list (XCDR (spec), tag_set, exact_p, 0, 0),
1638 add_meth); 1638 add_meth);
1639 } 1639 }
1640 } 1640 }
1641 1641
1642 /* map MAPFUN over the locales in SPECIFIER that are given in LOCALE. 1642 /* map MAPFUN over the locales in SPECIFIER that are given in LOCALE.
1643 CLOSURE is passed unchanged to MAPFUN. LOCALE can be one of 1643 CLOSURE is passed unchanged to MAPFUN. LOCALE can be one of
1644 1644
1645 -- nil (same as 'all) 1645 -- nil (same as 'all)
1833 Lisp_Object crock1 = specifier; 1833 Lisp_Object crock1 = specifier;
1834 Lisp_Object crock2 = XCAR (XCAR (rest)); 1834 Lisp_Object crock2 = XCAR (XCAR (rest));
1835 Lisp_Object crock3 = XCDR (XCAR (rest)); 1835 Lisp_Object crock3 = XCDR (XCAR (rest));
1836 1836
1837 specifier_add_spec (crock1, crock2, crock3, add_meth); 1837 specifier_add_spec (crock1, crock2, crock3, add_meth);
1838 } 1838 }
1839 recompute_cached_specifier_everywhere (specifier); 1839 recompute_cached_specifier_everywhere (specifier);
1840 return Qnil; 1840 return Qnil;
1841 } 1841 }
1842 1842
1843 struct specifier_spec_list_closure 1843 struct specifier_spec_list_closure
2035 }; 2035 };
2036 2036
2037 static int 2037 static int
2038 copy_specifier_mapfun (Lisp_Object specifier, 2038 copy_specifier_mapfun (Lisp_Object specifier,
2039 Lisp_Object locale, 2039 Lisp_Object locale,
2040 enum spec_locale_type locale_type, 2040 enum spec_locale_type locale_type,
2041 Lisp_Object tag_set, 2041 Lisp_Object tag_set,
2042 int exact_p, 2042 int exact_p,
2043 void *closure) 2043 void *closure)
2044 { 2044 {
2045 struct copy_specifier_closure *cl = 2045 struct copy_specifier_closure *cl =
2153 2153
2154 GCPRO1 (opaque); 2154 GCPRO1 (opaque);
2155 retval = call_with_suspended_errors 2155 retval = call_with_suspended_errors
2156 ((lisp_fn_t) call_validate_matchspec_method, 2156 ((lisp_fn_t) call_validate_matchspec_method,
2157 Qnil, Qspecifier, errb, 2, opaque, matchspec); 2157 Qnil, Qspecifier, errb, 2, opaque, matchspec);
2158 2158
2159 free_opaque_ptr (opaque); 2159 free_opaque_ptr (opaque);
2160 UNGCPRO; 2160 UNGCPRO;
2161 } 2161 }
2162 2162
2163 return retval; 2163 return retval;
2196 } 2196 }
2197 2197
2198 /* This function is purposely not callable from Lisp. If a Lisp 2198 /* This function is purposely not callable from Lisp. If a Lisp
2199 caller wants to set a fallback, they should just set the 2199 caller wants to set a fallback, they should just set the
2200 global value. */ 2200 global value. */
2201 2201
2202 void 2202 void
2203 set_specifier_fallback (Lisp_Object specifier, Lisp_Object fallback) 2203 set_specifier_fallback (Lisp_Object specifier, Lisp_Object fallback)
2204 { 2204 {
2205 struct Lisp_Specifier *sp = XSPECIFIER (specifier); 2205 struct Lisp_Specifier *sp = XSPECIFIER (specifier);
2206 assert (SPECIFIERP (fallback) || 2206 assert (SPECIFIERP (fallback) ||
2471 value will be a font-instance object. For glyphs, the returned value 2471 value will be a font-instance object. For glyphs, the returned value
2472 will be a string, pixmap, or subwindow. 2472 will be a string, pixmap, or subwindow.
2473 2473
2474 See also `specifier-matching-instance'. 2474 See also `specifier-matching-instance'.
2475 */ 2475 */
2476 (specifier, domain, defalt, no_fallback)) 2476 (specifier, domain, default_, no_fallback))
2477 { 2477 {
2478 Lisp_Object instance; 2478 Lisp_Object instance;
2479 2479
2480 CHECK_SPECIFIER (specifier); 2480 CHECK_SPECIFIER (specifier);
2481 domain = decode_domain (domain); 2481 domain = decode_domain (domain);
2482 2482
2483 instance = specifier_instance (specifier, Qunbound, domain, ERROR_ME, 0, 2483 instance = specifier_instance (specifier, Qunbound, domain, ERROR_ME, 0,
2484 !NILP (no_fallback), Qzero); 2484 !NILP (no_fallback), Qzero);
2485 if (UNBOUNDP (instance)) 2485 return UNBOUNDP (instance) ? default_ : instance;
2486 return defalt;
2487 return instance;
2488 } 2486 }
2489 2487
2490 DEFUN ("specifier-matching-instance", Fspecifier_matching_instance, 2, 5, 0, /* 2488 DEFUN ("specifier-matching-instance", Fspecifier_matching_instance, 2, 5, 0, /*
2491 Return an instance for SPECIFIER in DOMAIN that matches MATCHSPEC. 2489 Return an instance for SPECIFIER in DOMAIN that matches MATCHSPEC.
2492 If no instance can be generated for this domain, return DEFAULT. 2490 If no instance can be generated for this domain, return DEFAULT.
2508 (a font string) must have a registry that matches the charset's registry. 2506 (a font string) must have a registry that matches the charset's registry.
2509 (This only makes sense with Mule support.) This makes it easy to choose a 2507 (This only makes sense with Mule support.) This makes it easy to choose a
2510 font that can display a particular character. (This is what redisplay 2508 font that can display a particular character. (This is what redisplay
2511 does, in fact.) 2509 does, in fact.)
2512 */ 2510 */
2513 (specifier, matchspec, domain, defalt, no_fallback)) 2511 (specifier, matchspec, domain, default_, no_fallback))
2514 { 2512 {
2515 Lisp_Object instance; 2513 Lisp_Object instance;
2516 2514
2517 CHECK_SPECIFIER (specifier); 2515 CHECK_SPECIFIER (specifier);
2518 check_valid_specifier_matchspec (matchspec, XSPECIFIER (specifier)->methods, 2516 check_valid_specifier_matchspec (matchspec, XSPECIFIER (specifier)->methods,
2519 ERROR_ME); 2517 ERROR_ME);
2520 domain = decode_domain (domain); 2518 domain = decode_domain (domain);
2521 2519
2522 instance = specifier_instance (specifier, matchspec, domain, ERROR_ME, 0, 2520 instance = specifier_instance (specifier, matchspec, domain, ERROR_ME, 0,
2523 !NILP (no_fallback), Qzero); 2521 !NILP (no_fallback), Qzero);
2524 if (UNBOUNDP (instance)) 2522 return UNBOUNDP (instance) ? default_ : instance;
2525 return defalt;
2526 return instance;
2527 } 2523 }
2528 2524
2529 DEFUN ("specifier-instance-from-inst-list", 2525 DEFUN ("specifier-instance-from-inst-list",
2530 Fspecifier_instance_from_inst_list, 3, 4, 0, /* 2526 Fspecifier_instance_from_inst_list, 3, 4, 0, /*
2531 Attempt to convert a particular inst-list into an instance. 2527 Attempt to convert a particular inst-list into an instance.
2532 This attempts to instantiate INST-LIST in the given DOMAIN, 2528 This attempts to instantiate INST-LIST in the given DOMAIN,
2533 as if INST-LIST existed in a specification in SPECIFIER. If 2529 as if INST-LIST existed in a specification in SPECIFIER. If
2534 the instantiation fails, DEFAULT is returned. In most circumstances, 2530 the instantiation fails, DEFAULT is returned. In most circumstances,
2535 you should not use this function; use `specifier-instance' instead. 2531 you should not use this function; use `specifier-instance' instead.
2536 */ 2532 */
2537 (specifier, domain, inst_list, defalt)) 2533 (specifier, domain, inst_list, default_))
2538 { 2534 {
2539 Lisp_Object val = Qunbound; 2535 Lisp_Object val = Qunbound;
2540 struct Lisp_Specifier *sp = XSPECIFIER (specifier); 2536 struct Lisp_Specifier *sp = XSPECIFIER (specifier);
2541 struct gcpro gcpro1; 2537 struct gcpro gcpro1;
2542 Lisp_Object built_up_list = Qnil; 2538 Lisp_Object built_up_list = Qnil;
2549 if (!NILP (built_up_list)) 2545 if (!NILP (built_up_list))
2550 val = specifier_instance_from_inst_list (specifier, Qunbound, domain, 2546 val = specifier_instance_from_inst_list (specifier, Qunbound, domain,
2551 built_up_list, ERROR_ME, 0, 2547 built_up_list, ERROR_ME, 0,
2552 Qzero); 2548 Qzero);
2553 UNGCPRO; 2549 UNGCPRO;
2554 if (UNBOUNDP (val)) 2550 return UNBOUNDP (val) ? default_ : val;
2555 return defalt;
2556 return val;
2557 } 2551 }
2558 2552
2559 DEFUN ("specifier-matching-instance-from-inst-list", 2553 DEFUN ("specifier-matching-instance-from-inst-list",
2560 Fspecifier_matching_instance_from_inst_list, 4, 5, 0, /* 2554 Fspecifier_matching_instance_from_inst_list, 4, 5, 0, /*
2561 Attempt to convert a particular inst-list into an instance. 2555 Attempt to convert a particular inst-list into an instance.
2566 This function is analogous to `specifier-instance-from-inst-list' 2560 This function is analogous to `specifier-instance-from-inst-list'
2567 but allows for specification-matching as in `specifier-matching-instance'. 2561 but allows for specification-matching as in `specifier-matching-instance'.
2568 See that function for a description of exactly how the matching process 2562 See that function for a description of exactly how the matching process
2569 works. 2563 works.
2570 */ 2564 */
2571 (specifier, matchspec, domain, inst_list, defalt)) 2565 (specifier, matchspec, domain, inst_list, default_))
2572 { 2566 {
2573 Lisp_Object val = Qunbound; 2567 Lisp_Object val = Qunbound;
2574 struct Lisp_Specifier *sp = XSPECIFIER (specifier); 2568 struct Lisp_Specifier *sp = XSPECIFIER (specifier);
2575 struct gcpro gcpro1; 2569 struct gcpro gcpro1;
2576 Lisp_Object built_up_list = Qnil; 2570 Lisp_Object built_up_list = Qnil;
2585 if (!NILP (built_up_list)) 2579 if (!NILP (built_up_list))
2586 val = specifier_instance_from_inst_list (specifier, matchspec, domain, 2580 val = specifier_instance_from_inst_list (specifier, matchspec, domain,
2587 built_up_list, ERROR_ME, 0, 2581 built_up_list, ERROR_ME, 0,
2588 Qzero); 2582 Qzero);
2589 UNGCPRO; 2583 UNGCPRO;
2590 if (UNBOUNDP (val)) 2584 return UNBOUNDP (val) ? default_ : val;
2591 return defalt;
2592 return val;
2593 } 2585 }
2594 2586
2595 2587
2596 /************************************************************************/ 2588 /************************************************************************/
2597 /* Caching in the struct window or frame */ 2589 /* Caching in the struct window or frame */
2813 A generic specifier allows any kind of Lisp object as an instantiator, 2805 A generic specifier allows any kind of Lisp object as an instantiator,
2814 and returns back the Lisp object unchanged when it is instantiated. 2806 and returns back the Lisp object unchanged when it is instantiated.
2815 */ 2807 */
2816 (object)) 2808 (object))
2817 { 2809 {
2818 return (GENERIC_SPECIFIERP (object) ? Qt : Qnil); 2810 return GENERIC_SPECIFIERP (object) ? Qt : Qnil;
2819 } 2811 }
2820 2812
2821 2813
2822 /************************************************************************/ 2814 /************************************************************************/
2823 /* Integer specifier type */ 2815 /* Integer specifier type */
2834 DEFUN ("integer-specifier-p", Finteger_specifier_p, 1, 1, 0, /* 2826 DEFUN ("integer-specifier-p", Finteger_specifier_p, 1, 1, 0, /*
2835 Return non-nil if OBJECT is an integer specifier. 2827 Return non-nil if OBJECT is an integer specifier.
2836 */ 2828 */
2837 (object)) 2829 (object))
2838 { 2830 {
2839 return (INTEGER_SPECIFIERP (object) ? Qt : Qnil); 2831 return INTEGER_SPECIFIERP (object) ? Qt : Qnil;
2840 } 2832 }
2841 2833
2842 /************************************************************************/ 2834 /************************************************************************/
2843 /* Non-negative-integer specifier type */ 2835 /* Non-negative-integer specifier type */
2844 /************************************************************************/ 2836 /************************************************************************/
2854 DEFUN ("natnum-specifier-p", Fnatnum_specifier_p, 1, 1, 0, /* 2846 DEFUN ("natnum-specifier-p", Fnatnum_specifier_p, 1, 1, 0, /*
2855 Return non-nil if OBJECT is a natnum (non-negative-integer) specifier. 2847 Return non-nil if OBJECT is a natnum (non-negative-integer) specifier.
2856 */ 2848 */
2857 (object)) 2849 (object))
2858 { 2850 {
2859 return (NATNUM_SPECIFIERP (object) ? Qt : Qnil); 2851 return NATNUM_SPECIFIERP (object) ? Qt : Qnil;
2860 } 2852 }
2861 2853
2862 /************************************************************************/ 2854 /************************************************************************/
2863 /* Boolean specifier type */ 2855 /* Boolean specifier type */
2864 /************************************************************************/ 2856 /************************************************************************/
2875 DEFUN ("boolean-specifier-p", Fboolean_specifier_p, 1, 1, 0, /* 2867 DEFUN ("boolean-specifier-p", Fboolean_specifier_p, 1, 1, 0, /*
2876 Return non-nil if OBJECT is a boolean specifier. 2868 Return non-nil if OBJECT is a boolean specifier.
2877 */ 2869 */
2878 (object)) 2870 (object))
2879 { 2871 {
2880 return (BOOLEAN_SPECIFIERP (object) ? Qt : Qnil); 2872 return BOOLEAN_SPECIFIERP (object) ? Qt : Qnil;
2881 } 2873 }
2882 2874
2883 /************************************************************************/ 2875 /************************************************************************/
2884 /* Display table specifier type */ 2876 /* Display table specifier type */
2885 /************************************************************************/ 2877 /************************************************************************/
2889 static void 2881 static void
2890 display_table_validate (Lisp_Object instantiator) 2882 display_table_validate (Lisp_Object instantiator)
2891 { 2883 {
2892 if (!NILP(instantiator) && 2884 if (!NILP(instantiator) &&
2893 (!VECTORP (instantiator) || 2885 (!VECTORP (instantiator) ||
2894 XVECTOR (instantiator)->size != DISP_TABLE_SIZE)) 2886 XVECTOR_LENGTH (instantiator) != DISP_TABLE_SIZE))
2895 dead_wrong_type_argument (display_table_specifier_methods->predicate_symbol, 2887 dead_wrong_type_argument (display_table_specifier_methods->predicate_symbol,
2896 instantiator); 2888 instantiator);
2897 } 2889 }
2898 2890
2899 DEFUN ("display-table-specifier-p", Fdisplay_table_specifier_p, 1, 1, 0, /* 2891 DEFUN ("display-table-specifier-p", Fdisplay_table_specifier_p, 1, 1, 0, /*
2900 Return non-nil if OBJECT is an display-table specifier. 2892 Return non-nil if OBJECT is an display-table specifier.
2901 */ 2893 */
2902 (object)) 2894 (object))
2903 { 2895 {
2904 return (DISPLAYTABLE_SPECIFIERP (object) ? Qt : Qnil); 2896 return DISPLAYTABLE_SPECIFIERP (object) ? Qt : Qnil;
2905 } 2897 }
2906 2898
2907 2899
2908 /************************************************************************/ 2900 /************************************************************************/
2909 /* Initialization */ 2901 /* Initialization */