comparison lisp/prim/specifier.el @ 2:ac2d302a0011 r19-15b2

Import from CVS: tag r19-15b2
author cvs
date Mon, 13 Aug 2007 08:46:35 +0200
parents 376386a54a3c
children 0293115a14e9
comparison
equal deleted inserted replaced
1:c0c6a60d29db 2:ac2d302a0011
272 SPECIFIER). The valid instantiators for SPECIFIER depend on the 272 SPECIFIER). The valid instantiators for SPECIFIER depend on the
273 type of SPECIFIER (which you can determine using `specifier-type'). 273 type of SPECIFIER (which you can determine using `specifier-type').
274 The specifier `scrollbar-width', for example, is of type `integer', 274 The specifier `scrollbar-width', for example, is of type `integer',
275 meaning its valid instantiators are integers. The specifier 275 meaning its valid instantiators are integers. The specifier
276 governing the background color of the `default' face (you can 276 governing the background color of the `default' face (you can
277 retrieve this specifier using `(face-foreground 'default)') is 277 retrieve this specifier using `(face-background 'default)') is
278 of type `color', meaning its valid instantiators are strings naming 278 of type `color', meaning its valid instantiators are strings naming
279 colors and color-instance objects. For some types of specifiers, 279 colors and color-instance objects. For some types of specifiers,
280 such as `image' and `toolbar', the instantiators can be very 280 such as `image' and `toolbar', the instantiators can be very
281 complex. Generally this is documented in the appropriate predicate 281 complex. Generally this is documented in the appropriate predicate
282 function -- `color-specifier-p', `image-specifier-p', 282 function -- `color-specifier-p', `image-specifier-p',
295 and provide more normal backups for the other cases. (For example, 295 and provide more normal backups for the other cases. (For example,
296 you might like the color \"darkseagreen2\", but some X servers 296 you might like the color \"darkseagreen2\", but some X servers
297 don't recognize this color, so you could provide a backup 297 don't recognize this color, so you could provide a backup
298 \"forest green\". Color TTY devices probably won't recognize this 298 \"forest green\". Color TTY devices probably won't recognize this
299 either, so you could provide a second backup \"green\". You'd 299 either, so you could provide a second backup \"green\". You'd
300 do this by specifying an instantiator 300 do this by specifying this list of instantiators:
301 301
302 '(\"darkseagreen2\" \"forest green\" \"green\") 302 '(\"darkseagreen2\" \"forest green\" \"green\")
303 303
304 VALUE can also be various more complicated forms; see below. 304 VALUE can also be various more complicated forms; see below.
305 305
335 you try this.) 335 you try this.)
336 336
337 Finally, VALUE can itself be a specifier (of the same type as 337 Finally, VALUE can itself be a specifier (of the same type as
338 SPECIFIER), if you want to copy specifications from one specifier 338 SPECIFIER), if you want to copy specifications from one specifier
339 to another; this is equivalent to calling `copy-specifier', and 339 to another; this is equivalent to calling `copy-specifier', and
340 LOCALE, TAG-SET, and HOW-TO-ADD have the same semantics as that 340 LOCALE, TAG-SET, and HOW-TO-ADD have the same semantics as with
341 function. 341 that function.
342 342
343 Note that `set-specifier' is exactly complementary to `specifier-specs' 343 Note that `set-specifier' is exactly complementary to `specifier-specs'
344 except in the case where SPECIFIER has no specs at all in it but nil 344 except in the case where SPECIFIER has no specs at all in it but nil
345 is a valid instantiator (in that case, `specifier-specs' will return 345 is a valid instantiator (in that case, `specifier-specs' will return
346 nil (meaning no specs) and `set-specifier' will interpret the `nil' 346 nil (meaning no specs) and `set-specifier' will interpret the `nil'
347 as meaning \"I'm adding a global instantiator and its value is `nil'\"), 347 as meaning \"I'm adding a global instantiator and its value is `nil'\"),
348 or in strange cases where there is an ambiguity between a spec-list 348 or in strange cases where there is an ambiguity between a spec-list
349 and an inst-list, etc. (The built-in specifier types are designed 349 and an inst-list, etc. (The built-in specifier types are designed
350 in such a way as to avoid any such ambiguities.) 350 in such a way as to avoid any such ambiguities.)
351 351
352 NOTE: If you want to to work with spec-lists, you should probably not 352 NOTE: If you want to work with spec-lists, you should probably not
353 use either `set-specifier' or `specifier-specs', but should use the 353 use either `set-specifier' or `specifier-specs', but should use the
354 lower-level functions `add-spec-list-to-specifier' and `specifier-spec-list'. 354 lower-level functions `add-spec-list-to-specifier' and `specifier-spec-list'.
355 These functions always work with fully-qualified spec-lists; thus, there 355 These functions always work with fully-qualified spec-lists; thus, there
356 is no possibility for ambiguity and no need to go through the function 356 is no possibility for ambiguity and no need to go through the function
357 `canonicalize-spec-list', which is potentially time-consuming." 357 `canonicalize-spec-list', which is potentially time-consuming."