Mercurial > hg > xemacs-beta
diff src/specifier.h @ 5118:e0db3c197671 ben-lisp-object
merge up to latest default branch, doesn't compile yet
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Sat, 26 Dec 2009 21:18:49 -0600 |
parents | d00347ec8289 |
children | d1247f3cc363 |
line wrap: on
line diff
--- a/src/specifier.h Sat Dec 26 00:20:27 2009 -0600 +++ b/src/specifier.h Sat Dec 26 21:18:49 2009 -0600 @@ -139,7 +139,7 @@ void (*validate_matchspec_method) (Lisp_Object matchspec); /* Instantiate method: Return SPECIFIER instance in DOMAIN, - specified by INSTANTIATOR. MATCHSPEC specifies an additional + specified by INSTANTIATOR. MATCHSPEC specifies additional constraints on the instance value (see the docstring for Fspecifier_matching_instance function). MATCHSPEC is passed Qunbound when no matching constraints are imposed. The method is @@ -152,6 +152,9 @@ name specifier_instance) to avoid creating "external" specification loops. + NO_FALLBACK indicates that the method should not try the fallbacks + (and thus simply return Qunbound) in case of a failure to instantiate. + This method must presume that both INSTANTIATOR and MATCHSPEC are already validated by the corresponding validate_* methods, and may abort if they are invalid. @@ -166,7 +169,8 @@ Lisp_Object matchspec, Lisp_Object domain, Lisp_Object instantiator, - Lisp_Object depth); + Lisp_Object depth, + int no_fallback); /* Going-to-add method: Called when an instantiator is about to be added to a specifier. This function can specify @@ -255,7 +259,7 @@ }; typedef struct Lisp_Specifier Lisp_Specifier; -DECLARE_LRECORD (specifier, Lisp_Specifier); +DECLARE_LISP_OBJECT (specifier, Lisp_Specifier); #define XSPECIFIER(x) XRECORD (x, specifier, Lisp_Specifier) #define wrap_specifier(p) wrap_record (p, specifier) #define SPECIFIERP(x) RECORDP (x, specifier) @@ -343,7 +347,7 @@ INITIALIZE_SPECIFIER_TYPE (type, obj_name, pred_sym); \ type##_specifier_methods->extra_data_size = \ sizeof (struct type##_specifier); \ - type##_specifier_methods->extra_description = \ + type##_specifier_methods->extra_description = \ &type##_specifier_description_0; \ } while (0) @@ -423,6 +427,9 @@ struct specifier_caching { +#ifdef NEW_GC + struct lrecord_header header; +#endif /* NEW_GC */ int offset_into_struct_window; void (*value_changed_in_window) (Lisp_Object specifier, struct window *w, Lisp_Object oldval); @@ -432,6 +439,19 @@ int always_recompute; }; +#ifdef NEW_GC +DECLARE_LISP_OBJECT (specifier_caching, struct specifier_caching); +#define XSPECIFIER_CACHING(x) \ + XRECORD (x, specifier_caching, struct specifier_caching) +#define wrap_specifier_caching(p) \ + wrap_record (p, specifier_caching) +#define SPECIFIER_CACHINGP(x) RECORDP (x, specifier_caching) +#define CHECK_SPECIFIER_CACHING(x) \ + CHECK_RECORD (x, specifier_caching) +#define CONCHECK_SPECIFIER_CACHING(x) \ + CONCHECK_RECORD (x, specifier_caching) +#endif /* NEW_GC */ + /* #### get image instances out of domains! */ /* #### I think the following should ABORT() rather than return nil @@ -519,6 +539,7 @@ void cleanup_specifiers (void); void prune_specifiers (void); void setup_device_initial_specifier_tags (struct device *d); +void setup_charset_initial_specifier_tags (Lisp_Object charset); void kill_specifier_buffer_locals (Lisp_Object buffer); DECLARE_SPECIFIER_TYPE (generic); @@ -551,4 +572,18 @@ #define CHECK_DISPLAYTABLE_SPECIFIER(x) CHECK_SPECIFIER_TYPE (x, display_table) #define CONCHECK_DISPLAYTABLE_SPECIFIER(x) CONCHECK_SPECIFIER_TYPE (x, display_table) +/* The various stages of font instantiation; initial means "find a font for + CHARSET that matches the charset's registries" and final means "find a + font for CHARSET that matches iso10646-1, since we haven't found a font + that matches its registry." */ +enum font_specifier_matchspec_stages { + initial, + final, + impossible, +}; + +Lisp_Object define_specifier_tag(Lisp_Object tag, + Lisp_Object device_predicate, + Lisp_Object charset_predicate); + #endif /* INCLUDED_specifier_h_ */