Next: , Previous: , Up: Specifiers   [Contents][Index]


48.7 Retrieving the Specifications from a Specifier

Function: specifier-spec-list specifier &optional locale tag-set exact-p

This function returns the spec-list of specifications for specifier in locale.

If locale is a particular locale (a window, buffer, frame, device, or the symbol global), a spec-list consisting of the specification for that locale will be returned.

If locale is a locale type (i.e. one of the symbols window, buffer, frame, or device), a spec-list of the specifications for all locales of that type will be returned.

If locale is nil or the symbol all, a spec-list of all specifications in specifier will be returned.

locale can also be a list of locales, locale types, and/or all; the result is as if specifier-spec-list were called on each element of the list and the results concatenated together.

Only instantiators where tag-set (a list of zero or more tags) is a subset of (or possibly equal to) the instantiator’s tag set are returned. (The default value of nil is a subset of all tag sets, so in this case no instantiators will be screened out.) If exact-p is non-nil, however, tag-set must be equal to an instantiator’s tag set for the instantiator to be returned.

Function: specifier-specs specifier &optional locale tag-set exact-p

This function returns the specification(s) for specifier in locale.

If locale is a single locale or is a list of one element containing a single locale, then a “short form” of the instantiators for that locale will be returned. Otherwise, this function is identical to specifier-spec-list.

The “short form” is designed for readability and not for ease of use in Lisp programs, and is as follows:

  1. If there is only one instantiator, then an inst-pair (i.e. cons of tag and instantiator) will be returned; otherwise a list of inst-pairs will be returned.
  2. For each inst-pair returned, if the instantiator’s tag is any, the tag will be removed and the instantiator itself will be returned instead of the inst-pair.
  3. If there is only one instantiator, its value is nil, and its tag is any, a one-element list containing nil will be returned rather than just nil, to distinguish this case from there being no instantiators at all.
Function: specifier-fallback specifier

This function returns the fallback value for specifier. Fallback values are provided by the C code for certain built-in specifiers to make sure that instancing won’t fail even if all specs are removed from the specifier, or to implement simple inheritance behavior (e.g. this method is used to ensure that faces other than default inherit their attributes from default). By design, you cannot change the fallback value, and specifiers created with make-specifier will never have a fallback (although a similar, Lisp-accessible capability may be provided in the future to allow for inheritance).

The fallback value will be an inst-list that is instanced like any other inst-list, a specifier of the same type as specifier (results in inheritance), or nil for no fallback.

When you instance a specifier, you can explicitly request that the fallback not be consulted. (The C code does this, for example, when merging faces.) See specifier-instance.


Next: , Previous: , Up: Specifiers   [Contents][Index]