Mercurial > hg > xemacs-beta
comparison man/lispref/faces.texi @ 444:576fb035e263 r21-2-37
Import from CVS: tag r21-2-37
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:36:19 +0200 |
parents | abe6d1db359e |
children | c6facab13185 |
comparison
equal
deleted
inserted
replaced
443:a8296e22da4e | 444:576fb035e263 |
---|---|
125 If it is @code{t}, only the temporary faces are included. If it is any | 125 If it is @code{t}, only the temporary faces are included. If it is any |
126 other non-@code{nil} value both permanent and temporary are included. | 126 other non-@code{nil} value both permanent and temporary are included. |
127 @end defun | 127 @end defun |
128 | 128 |
129 @defun facep object | 129 @defun facep object |
130 This function returns whether the given object is a face. | 130 This function returns @code{t} if @var{object} is a face, else @code{nil}. |
131 @end defun | 131 @end defun |
132 | 132 |
133 @defun copy-face old-face new-name &optional locale how-to-add | 133 @defun copy-face old-face new-name &optional locale tag-set exact-p how-to-add |
134 This function defines a new face named @var{new-name} which is a copy of | 134 This function defines a new face named @var{new-name} which is a copy of |
135 the existing face named @var{old-face}. If there is already a face | 135 the existing face named @var{old-face}. If there is already a face |
136 named @var{new-name}, then it alters the face to have the same | 136 named @var{new-name}, then it alters the face to have the same |
137 properties as @var{old-face}. @var{locale} and @var{how-to-add} | 137 properties as @var{old-face}. |
138 let you copy just parts of the old face rather than the whole face, | 138 |
139 and are as in @code{copy-specifier} (@pxref{Specifiers}). | 139 @var{locale}, @var{tag-set}, @var{exact-p} and @var{how-to-add} let you |
140 copy just parts of the old face rather than the whole face, and are as | |
141 in @code{copy-specifier} (@pxref{Specifiers}). | |
140 @end defun | 142 @end defun |
141 | 143 |
142 @node Face Properties | 144 @node Face Properties |
143 @subsection Face Properties | 145 @subsection Face Properties |
144 | 146 |
185 Description of what the face's normal use is. NOTE: This is not a | 187 Description of what the face's normal use is. NOTE: This is not a |
186 specifier, unlike all the other built-in properties, and cannot contain | 188 specifier, unlike all the other built-in properties, and cannot contain |
187 locale-specific values. | 189 locale-specific values. |
188 @end table | 190 @end table |
189 | 191 |
190 @defun set-face-property face property value &optional locale tag how-to-add | 192 @defun set-face-property face property value &optional locale tag-set how-to-add |
191 This function changes a property of a @var{face}. | 193 This function changes a property of a @var{face}. |
192 | 194 |
193 For built-in properties, the actual value of the property is a specifier | 195 For built-in properties, the actual value of the property is a specifier |
194 and you cannot change this; but you can change the specifications within | 196 and you cannot change this; but you can change the specifications within |
195 the specifier, and that is what this function will do. For user-defined | 197 the specifier, and that is what this function will do. For user-defined |
246 @code{add-spec-to-specifier}. If the value of the property is not a | 248 @code{add-spec-to-specifier}. If the value of the property is not a |
247 specifier, it will automatically be converted into a @code{generic} | 249 specifier, it will automatically be converted into a @code{generic} |
248 specifier. | 250 specifier. |
249 @end defun | 251 @end defun |
250 | 252 |
251 @defun remove-face-property face property &optional local tag-set exact-p | 253 @defun remove-face-property face property &optional locale tag-set exact-p |
252 This function removes a property of a @var{face}. | 254 This function removes a property of a @var{face}. |
253 | 255 |
254 For built-in properties, this is analogous to @code{remove-specifier}. | 256 For built-in properties, this is analogous to @code{remove-specifier}. |
255 For more information, @xref{Other Specification Functions}. | 257 For more information, @xref{Other Specification Functions}. |
256 | 258 |
261 @code{remove-specifier}. If the value of the property is not a | 263 @code{remove-specifier}. If the value of the property is not a |
262 specifier, it will be converted into a @code{generic} specifier | 264 specifier, it will be converted into a @code{generic} specifier |
263 automatically. | 265 automatically. |
264 @end defun | 266 @end defun |
265 | 267 |
266 @defun face-property face property &optional locale | 268 @defun face-property face property &optional locale tag-set exact-p |
267 This function returns @var{face}'s value of the given @var{property}. | 269 This function returns @var{face}'s value of the given @var{property}. |
268 | 270 |
269 If @var{locale} is omitted, the @var{face}'s actual value for | 271 If @var{locale} is omitted, the @var{face}'s actual value for |
270 @var{property} will be returned. For built-in properties, this will be | 272 @var{property} will be returned. For built-in properties, this will be |
271 a specifier object of a type appropriate to the property (e.g. a font or | 273 a specifier object of a type appropriate to the property (e.g. a font or |
352 @end defun | 354 @end defun |
353 | 355 |
354 @node Face Convenience Functions | 356 @node Face Convenience Functions |
355 @subsection Face Convenience Functions | 357 @subsection Face Convenience Functions |
356 | 358 |
357 @defun set-face-foreground face color &optional locale tag how-to-add | 359 @deffn Command set-face-foreground face color &optional locale tag-set how-to-add |
358 @defunx set-face-background face color &optional locale tag how-to-add | 360 @deffnx Command set-face-background face color &optional locale tag-set how-to-add |
359 These functions set the foreground (respectively, background) color of | 361 These functions set the foreground (respectively, background) color of |
360 face @var{face} to @var{color}. The argument @var{color} should be a | 362 face @var{face} to @var{color}. The argument @var{color} should be a |
361 string (the name of a color) or a color object as returned by | 363 string (the name of a color) or a color object as returned by |
362 @code{make-color} (@pxref{Colors}). | 364 @code{make-color} (@pxref{Colors}). |
363 @end defun | 365 @end deffn |
364 | 366 |
365 @defun set-face-background-pixmap face pixmap &optional locale tag how-to-add | 367 @deffn Command set-face-background-pixmap face pixmap &optional locale tag-set how-to-add |
366 This function sets the background pixmap of face @var{face} to | 368 This function sets the background pixmap of face @var{face} to |
367 @var{pixmap}. The argument @var{pixmap} should be a string (the name of | 369 @var{pixmap}. The argument @var{pixmap} should be a string (the name of |
368 a bitmap or pixmap file; the directories listed in the variable | 370 a bitmap or pixmap file; the directories listed in the variable |
369 @code{x-bitmap-file-path} will be searched) or a glyph object as | 371 @code{x-bitmap-file-path} will be searched) or a glyph object as |
370 returned by @code{make-glyph} (@pxref{Glyphs}). The argument may also | 372 returned by @code{make-glyph} (@pxref{Glyphs}). The argument may also |
371 be a list of the form @code{(@var{width} @var{height} @var{data})} where | 373 be a list of the form @code{(@var{width} @var{height} @var{data})} where |
372 @var{width} and @var{height} are the size in pixels, and @var{data} is a | 374 @var{width} and @var{height} are the size in pixels, and @var{data} is a |
373 string, containing the raw bits of the bitmap. | 375 string, containing the raw bits of the bitmap. |
374 @end defun | 376 @end deffn |
375 | 377 |
376 @defun set-face-font face font &optional locale tag how-to-add | 378 @deffn Command set-face-font face font &optional locale tag-set how-to-add |
377 This function sets the font of face @var{face}. The argument @var{font} | 379 This function sets the font of face @var{face}. The argument @var{font} |
378 should be a string or a font object as returned by @code{make-font} | 380 should be a string or a font object as returned by @code{make-font} |
379 (@pxref{Fonts}). | 381 (@pxref{Fonts}). |
380 @end defun | 382 @end deffn |
381 | 383 |
382 @defun set-face-underline-p face underline-p &optional locale tag how-to-add | 384 @deffn Command set-face-underline-p face underline-p &optional locale tag-set how-to-add |
383 This function sets the underline property of face @var{face}. | 385 This function sets the underline property of face @var{face}. |
384 @end defun | 386 @end deffn |
385 | 387 |
386 @defun face-foreground face &optional locale | 388 @defun face-foreground face &optional locale tag-set exact-p |
387 @defunx face-background face &optional locale | 389 @defunx face-background face &optional locale tag-set exact-p |
388 These functions return the foreground (respectively, background) color | 390 These functions return the foreground (respectively, background) color |
389 specifier of face @var{face}. | 391 specifier of face @var{face}. |
390 @xref{Colors}. | 392 @xref{Colors}. |
391 @end defun | 393 @end defun |
392 | 394 |
393 @defun face-background-pixmap face &optional locale | 395 @defun face-background-pixmap face &optional locale tag-set exact-p |
394 This function return the background-pixmap glyph object of face | 396 This function return the background-pixmap glyph object of face |
395 @var{face}. | 397 @var{face}. |
396 @end defun | 398 @end defun |
397 | 399 |
398 @defun face-font face &optional locale | 400 @defun face-font face &optional locale tag-set exact-p |
399 This function returns the font specifier of face @var{face}. (Note: | 401 This function returns the font specifier of face @var{face}. (Note: |
400 This is not the same as the function @code{face-font} in FSF Emacs.) | 402 This is not the same as the function @code{face-font} in FSF Emacs.) |
403 | |
401 @xref{Fonts}. | 404 @xref{Fonts}. |
402 @end defun | 405 @end defun |
403 | 406 |
404 @defun face-font-name face &optional domain | 407 @defun face-font-name face &optional domain |
405 This function returns the name of the font of face @var{face}, or | 408 This function returns the name of the font of face @var{face}, or |
431 @end defun | 434 @end defun |
432 | 435 |
433 @node Other Face Display Functions | 436 @node Other Face Display Functions |
434 @subsection Other Face Display Functions | 437 @subsection Other Face Display Functions |
435 | 438 |
436 @defun invert-face face &optional locale | 439 @deffn Command invert-face face &optional locale |
437 Swap the foreground and background colors of face @var{face}. If the | 440 Swap the foreground and background colors of face @var{face}. If the |
438 face doesn't specify both foreground and background, then its foreground | 441 face doesn't specify both foreground and background, then its foreground |
439 and background are set to the default background and foreground. | 442 and background are set to the default background and foreground. |
440 @end defun | 443 @end deffn |
441 | 444 |
442 @defun face-equal face1 face2 &optional domain | 445 @defun face-equal face1 face2 &optional domain |
443 This returns @code{t} if the faces @var{face1} and @var{face2} will | 446 This returns @code{t} if the faces @var{face1} and @var{face2} will |
444 display in the same way. @var{domain} is as in | 447 display in the same way. @var{domain} is as in |
445 @code{face-property-instance}. | 448 @code{face-property-instance}. |
582 @cindex bold | 585 @cindex bold |
583 @cindex demibold | 586 @cindex demibold |
584 @cindex italic | 587 @cindex italic |
585 @cindex oblique | 588 @cindex oblique |
586 | 589 |
587 @defun font-instance-properties font | 590 @defun font-instance-properties font-instance |
588 This function returns the properties (an alist or @code{nil}) of | 591 This function returns the properties (an alist or @code{nil}) of |
589 @var{font-instance}. | 592 @var{font-instance}. |
590 @end defun | 593 @end defun |
591 | 594 |
592 @defun x-make-font-bold font &optional device | 595 @defun x-make-font-bold font &optional device |
709 @item | 712 @item |
710 A vector of two or three elements: a face to inherit from, optionally a | 713 A vector of two or three elements: a face to inherit from, optionally a |
711 symbol naming the property of that face to inherit from (if omitted, | 714 symbol naming the property of that face to inherit from (if omitted, |
712 defaults to the same property that this face-boolean specifier is used | 715 defaults to the same property that this face-boolean specifier is used |
713 for; if this specifier is not part of a face, the instantiator would not | 716 for; if this specifier is not part of a face, the instantiator would not |
714 be valid), and optionally a value which, if non-nil, means to invert the | 717 be valid), and optionally a value which, if non-@code{nil}, means to invert the |
715 sense of the inherited property. | 718 sense of the inherited property. |
716 @end itemize | 719 @end itemize |
717 | 720 |
718 @end defun | 721 @end defun |
719 | 722 |
734 | 737 |
735 The color-instance object returned describes the way the background | 738 The color-instance object returned describes the way the background |
736 color of the @code{default} face is displayed in the next window after | 739 color of the @code{default} face is displayed in the next window after |
737 the selected one. | 740 the selected one. |
738 | 741 |
739 @defun color-instance-p object | 742 @defun color-instance-p object |
740 This function returns non-@code{nil} if @var{object} is a color-instance. | 743 This function returns non-@code{nil} if @var{object} is a color-instance. |
741 @end defun | 744 @end defun |
742 | 745 |
743 @node Color Instance Properties | 746 @node Color Instance Properties |
744 @subsection Color Instance Properties | 747 @subsection Color Instance Properties |
745 | 748 |
746 @defun color-instance-name color-instance | 749 @defun color-instance-name color-instance |
747 This function returns the name used to allocate @var{color-instance}. | 750 This function returns the name used to allocate @var{color-instance}. |
748 @end defun | 751 @end defun |
749 | 752 |
750 @defun color-instance-rgb-components color-instance | 753 @defun color-instance-rgb-components color-instance |
751 This function returns a three element list containing the red, green, | 754 This function returns a three element list containing the red, green, |
752 and blue color components of @var{color-instance}. | 755 and blue color components of @var{color-instance}. |