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


48.8 Working With Specifier Tags

A specifier tag set is an entity that is attached to an instantiator and can be used to restrict the scope of that instantiator to a particular device class or device type and/or to mark instantiators added by a particular package so that they can be later removed.

A specifier tag set consists of a list of zero or more specifier tags, each of which is a symbol that is recognized by SXEmacs as a tag. (The valid device types and device classes are always tags, as are any tags defined by define-specifier-tag.) It is called a “tag set” (as opposed to a list) because the order of the tags or the number of times a particular tag occurs does not matter.

Each tag has a predicate associated with it, which specifies whether that tag applies to a particular device. The tags which are device types and classes match devices of that type or class. User-defined tags can have any predicate, or none (meaning that all devices match). When attempting to instance a specifier, a particular instantiator is only considered if the device of the domain being instanced over matches all tags in the tag set attached to that instantiator.

Most of the time, a tag set is not specified, and the instantiator gets a null tag set, which matches all devices.

Function: valid-specifier-tag-p tag

This function returns non-nil if tag is a valid specifier tag.

Function: valid-specifier-tag-set-p tag-set

This function returns non-nil if tag-set is a valid specifier tag set.

Function: canonicalize-tag-set tag-set

This function canonicalizes the given tag set. Two canonicalized tag sets can be compared with equal to see if they represent the same tag set. (Specifically, canonicalizing involves sorting by symbol name and removing duplicates.)

Function: device-matches-specifier-tag-set-p device tag-set

This function returns non-nil if device matches specifier tag set tag-set. This means that device matches each tag in the tag set.

Function: define-specifier-tag tag &optional predicate

This function defines a new specifier tag. If predicate is specified, it should be a function of one argument (a device) that specifies whether the tag matches that particular device. If predicate is omitted, the tag matches all devices.

You can redefine an existing user-defined specifier tag. However, you cannot redefine the built-in specifier tags (the device types and classes) or the symbols nil, t, all, or global.

Function: device-matching-specifier-tag-list &optional device

This function returns a list of all specifier tags matching device. device defaults to the selected device if omitted.

Function: specifier-tag-list

This function returns a list of all currently-defined specifier tags. This includes the built-in ones (the device types and classes).

Function: specifier-tag-predicate tag

This function returns the predicate for the given specifier tag.


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