comparison man/lispref/specifiers.texi @ 398:74fd4e045ea6 r21-2-29

Import from CVS: tag r21-2-29
author cvs
date Mon, 13 Aug 2007 11:13:30 +0200
parents 7d59cb494b73
children 501cfd01ee6d
comparison
equal deleted inserted replaced
397:f4aeb21a5bad 398:74fd4e045ea6
20 @defun specifierp object 20 @defun specifierp object
21 This function returns non-@code{nil} if @var{object} is a specifier. 21 This function returns non-@code{nil} if @var{object} is a specifier.
22 @end defun 22 @end defun
23 23
24 @menu 24 @menu
25 * Introduction to Specifiers:: Specifiers provide a clean way for 25 * Introduction to Specifiers:: Specifiers provide a clean way for
26 display and other properties to vary 26 display and other properties to vary
27 (under user control) in a wide variety 27 (under user control) in a wide variety
28 of contexts. 28 of contexts.
29 * Specifiers In-Depth:: Gory details about specifier innards. 29 * Specifiers In-Depth:: Gory details about specifier innards.
30 * Specifier Instancing:: Instancing means obtaining the ``value'' of 30 * Specifier Instancing:: Instancing means obtaining the ``value'' of
31 a specifier in a particular context. 31 a specifier in a particular context.
32 * Specifier Types:: Specifiers come in different flavors. 32 * Specifier Types:: Specifiers come in different flavors.
33 * Adding Specifications:: Specifications control a specifier's ``value'' 33 * Adding Specifications:: Specifications control a specifier's ``value''
34 by giving conditions under which a 34 by giving conditions under which a
35 particular value is valid. 35 particular value is valid.
36 * Retrieving Specifications:: Querying a specifier's specifications. 36 * Retrieving Specifications:: Querying a specifier's specifications.
37 * Specifier Tag Functions:: Working with specifier tags. 37 * Specifier Tag Functions:: Working with specifier tags.
38 * Specifier Instancing Functions:: 38 * Specifier Instancing Functions::
39 Functions to instance a specifier. 39 Functions to instance a specifier.
40 * Specifier Example:: Making all this stuff clearer. 40 * Specifier Example:: Making all this stuff clearer.
41 * Creating Specifiers:: Creating specifiers for your own use. 41 * Creating Specifiers:: Creating specifiers for your own use.
42 * Specifier Validation Functions:: 42 * Specifier Validation Functions::
43 Validating the components of a specifier. 43 Validating the components of a specifier.
44 * Other Specification Functions:: 44 * Other Specification Functions::
45 Other ways of working with specifications. 45 Other ways of working with specifications.
46 @end menu 46 @end menu
47 47
48 @node Introduction to Specifiers 48 @node Introduction to Specifiers
49 @section Introduction to Specifiers 49 @section Introduction to Specifiers
50 50
167 @code{grayscale}, and @code{mono}) can always be used as tags, and match 167 @code{grayscale}, and @code{mono}) can always be used as tags, and match
168 devices of the associated type or class (@pxref{Consoles and Devices}). 168 devices of the associated type or class (@pxref{Consoles and Devices}).
169 User-defined tags may be defined, with an optional predicate specified. 169 User-defined tags may be defined, with an optional predicate specified.
170 An application can create its own tag, use it to mark all its 170 An application can create its own tag, use it to mark all its
171 instantiators, and be fairly confident that it will not interfere with 171 instantiators, and be fairly confident that it will not interfere with
172 other applications that modify the same specifier -- Functions that add 172 other applications that modify the same specifier---Functions that add
173 a specification to a specifier usually only overwrite existing 173 a specification to a specifier usually only overwrite existing
174 inst-pairs with the same tag set as was given, and a particular tag or 174 inst-pairs with the same tag set as was given, and a particular tag or
175 tag set can be specified when removing instantiators. 175 tag set can be specified when removing instantiators.
176 176
177 When a specifier is instanced in a domain, both the locale and the tag 177 When a specifier is instanced in a domain, both the locale and the tag
194 used to display the font on that device (a font-description string 194 used to display the font on that device (a font-description string
195 under X is usually a wildcard specification that may resolve to 195 under X is usually a wildcard specification that may resolve to
196 different font names, with possibly different foundries, widths, etc., 196 different font names, with possibly different foundries, widths, etc.,
197 on different devices), the extra properties of that font on that 197 on different devices), the extra properties of that font on that
198 device, etc. Furthermore, this conversion (called @dfn{instantiation}) 198 device, etc. Furthermore, this conversion (called @dfn{instantiation})
199 might fail -- a font or color might not exist on a particular device, 199 might fail---a font or color might not exist on a particular device,
200 for example. 200 for example.
201 201
202 @node Specifier Instancing 202 @node Specifier Instancing
203 @section How a Specifier Is Instanced 203 @section How a Specifier Is Instanced
204 @cindex fallback (in a specifier) 204 @cindex fallback (in a specifier)
859 @example 859 @example
860 (specifier-specs sp) 860 (specifier-specs sp)
861 @result{} ((#<buffer "device.c"> (nil . "forest green")) 861 @result{} ((#<buffer "device.c"> (nil . "forest green"))
862 (#<window on "Makefile" 0x8a2b> (nil . "hot pink")) 862 (#<window on "Makefile" 0x8a2b> (nil . "hot pink"))
863 (#<x-frame "emacs" 0x4ac> (nil . "puke orange") 863 (#<x-frame "emacs" 0x4ac> (nil . "puke orange")
864 (nil . "moccasin")) 864 (nil . "moccasin"))
865 (#<x-frame "VM" 0x4ac> (nil . "magenta")) 865 (#<x-frame "VM" 0x4ac> (nil . "magenta"))
866 (global ((tty) . "cyan") (nil . "white")) 866 (global ((tty) . "cyan") (nil . "white"))
867 ) 867 )
868 @end example 868 @end example
869 869
870 Then, say we want to determine what the background color of the default 870 Then, say we want to determine what the background color of the default
871 face is for the window currently displaying the buffer @samp{*scratch*}. 871 face is for the window currently displaying the buffer @samp{*scratch*}.
888 The result is arrived at like this: 888 The result is arrived at like this:
889 889
890 @enumerate 890 @enumerate
891 @item 891 @item
892 First, we look for a specification matching the buffer displayed in the 892 First, we look for a specification matching the buffer displayed in the
893 window, i.e. @samp{*scratch}. There are none, so we proceed. 893 window, i.e. @samp{*scratch*}. There are none, so we proceed.
894 @item 894 @item
895 Then, we look for a specification matching the window itself. Again, there 895 Then, we look for a specification matching the window itself. Again, there
896 are none. 896 are none.
897 @item 897 @item
898 Then, we look for a specification matching the window's frame. The 898 Then, we look for a specification matching the window's frame. The