diff options
| author | Glenn Morris | 2012-11-21 00:39:08 -0800 |
|---|---|---|
| committer | Glenn Morris | 2012-11-21 00:39:08 -0800 |
| commit | 1bf335cf4327486931b6d4fe42fe1bd3c14406cf (patch) | |
| tree | ce1b0a6dae728a6b00c9f5e5af3e3421f66c9e1d /doc | |
| parent | 3ca2f1bf25b46877497c34c70b36dd511678e29b (diff) | |
| download | emacs-1bf335cf4327486931b6d4fe42fe1bd3c14406cf.tar.gz emacs-1bf335cf4327486931b6d4fe42fe1bd3c14406cf.zip | |
Add optional "inherit" argument for face-bold-p and related functions
* lisp/faces.el (face-underline-p, face-inverse-video-p, face-bold-p)
(face-italic-p): Add optional argument "inherit".
* doc/lispref/display.texi (Attribute Functions):
Add new "inherit" argument for face-bold-p etc.
Move description of this argument to a common section, like "frame".
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/ChangeLog | 2 | ||||
| -rw-r--r-- | doc/lispref/display.texi | 41 |
2 files changed, 17 insertions, 26 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 9dee3797bdd..99e21bac469 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -2,6 +2,8 @@ | |||
| 2 | 2 | ||
| 3 | * display.texi (Attribute Functions): | 3 | * display.texi (Attribute Functions): |
| 4 | Update for set-face-* name changes. | 4 | Update for set-face-* name changes. |
| 5 | Add new "inherit" argument for face-bold-p etc. | ||
| 6 | Move description of this argument to a common section, like "frame". | ||
| 5 | 7 | ||
| 6 | * debugging.texi (Profiling): New section. | 8 | * debugging.texi (Profiling): New section. |
| 7 | (Debugging): Mention profiling in the introduction. | 9 | (Debugging): Mention profiling in the introduction. |
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 0932e8ceac2..5148c6ec22e 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -2453,59 +2453,48 @@ This swaps the foreground and background colors of face @var{face}. | |||
| 2453 | don't specify @var{frame}, they refer to the selected frame; @code{t} | 2453 | don't specify @var{frame}, they refer to the selected frame; @code{t} |
| 2454 | refers to the default data for new frames. They return the symbol | 2454 | refers to the default data for new frames. They return the symbol |
| 2455 | @code{unspecified} if the face doesn't define any value for that | 2455 | @code{unspecified} if the face doesn't define any value for that |
| 2456 | attribute. | 2456 | attribute. If @var{inherit} is @code{nil}, only an attribute directly |
| 2457 | defined by the face is returned. If @var{inherit} is non-@code{nil}, | ||
| 2458 | any faces specified by its @code{:inherit} attribute are considered as | ||
| 2459 | well, and if @var{inherit} is a face or a list of faces, then they are | ||
| 2460 | also considered, until a specified attribute is found. To ensure that | ||
| 2461 | the return value is always specified, use a value of @code{default} for | ||
| 2462 | @var{inherit}. | ||
| 2463 | |||
| 2464 | @defun face-font face &optional frame | ||
| 2465 | This function returns the name of the font of face @var{face}. | ||
| 2466 | @end defun | ||
| 2457 | 2467 | ||
| 2458 | @defun face-foreground face &optional frame inherit | 2468 | @defun face-foreground face &optional frame inherit |
| 2459 | @defunx face-background face &optional frame inherit | 2469 | @defunx face-background face &optional frame inherit |
| 2460 | These functions return the foreground color (or background color, | 2470 | These functions return the foreground color (or background color, |
| 2461 | respectively) of face @var{face}, as a string. | 2471 | respectively) of face @var{face}, as a string. |
| 2462 | |||
| 2463 | If @var{inherit} is @code{nil}, only a color directly defined by the face is | ||
| 2464 | returned. If @var{inherit} is non-@code{nil}, any faces specified by its | ||
| 2465 | @code{:inherit} attribute are considered as well, and if @var{inherit} | ||
| 2466 | is a face or a list of faces, then they are also considered, until a | ||
| 2467 | specified color is found. To ensure that the return value is always | ||
| 2468 | specified, use a value of @code{default} for @var{inherit}. | ||
| 2469 | @end defun | 2472 | @end defun |
| 2470 | 2473 | ||
| 2471 | @defun face-stipple face &optional frame inherit | 2474 | @defun face-stipple face &optional frame inherit |
| 2472 | This function returns the name of the background stipple pattern of face | 2475 | This function returns the name of the background stipple pattern of face |
| 2473 | @var{face}, or @code{nil} if it doesn't have one. | 2476 | @var{face}, or @code{nil} if it doesn't have one. |
| 2474 | |||
| 2475 | If @var{inherit} is @code{nil}, only a stipple directly defined by the | ||
| 2476 | face is returned. If @var{inherit} is non-@code{nil}, any faces | ||
| 2477 | specified by its @code{:inherit} attribute are considered as well, and | ||
| 2478 | if @var{inherit} is a face or a list of faces, then they are also | ||
| 2479 | considered, until a specified stipple is found. To ensure that the | ||
| 2480 | return value is always specified, use a value of @code{default} for | ||
| 2481 | @var{inherit}. | ||
| 2482 | @end defun | ||
| 2483 | |||
| 2484 | @defun face-font face &optional frame | ||
| 2485 | This function returns the name of the font of face @var{face}. | ||
| 2486 | @end defun | 2477 | @end defun |
| 2487 | 2478 | ||
| 2488 | @defun face-bold-p face &optional frame | 2479 | @defun face-bold-p face &optional frame inherit |
| 2489 | This function returns a non-@code{nil} value if the @code{:weight} | 2480 | This function returns a non-@code{nil} value if the @code{:weight} |
| 2490 | attribute of @var{face} is bolder than normal (i.e., one of | 2481 | attribute of @var{face} is bolder than normal (i.e., one of |
| 2491 | @code{semi-bold}, @code{bold}, @code{extra-bold}, or | 2482 | @code{semi-bold}, @code{bold}, @code{extra-bold}, or |
| 2492 | @code{ultra-bold}). Otherwise, it returns @code{nil}. | 2483 | @code{ultra-bold}). Otherwise, it returns @code{nil}. |
| 2493 | @end defun | 2484 | @end defun |
| 2494 | 2485 | ||
| 2495 | @defun face-italic-p face &optional frame | 2486 | @defun face-italic-p face &optional frame inherit |
| 2496 | This function returns a non-@code{nil} value if the @code{:slant} | 2487 | This function returns a non-@code{nil} value if the @code{:slant} |
| 2497 | attribute of @var{face} is @code{italic} or @code{oblique}, and | 2488 | attribute of @var{face} is @code{italic} or @code{oblique}, and |
| 2498 | @code{nil} otherwise. | 2489 | @code{nil} otherwise. |
| 2499 | @end defun | 2490 | @end defun |
| 2500 | 2491 | ||
| 2501 | @c Note the weasel words. A face that inherits from an underlined | 2492 | @defun face-underline-p face &optional frame inherit |
| 2502 | @c face but does not specify :underline will return nil. | ||
| 2503 | @defun face-underline-p face &optional frame | ||
| 2504 | This function returns non-@code{nil} if face @var{face} specifies | 2493 | This function returns non-@code{nil} if face @var{face} specifies |
| 2505 | a non-@code{nil} @code{:underline} attribute. | 2494 | a non-@code{nil} @code{:underline} attribute. |
| 2506 | @end defun | 2495 | @end defun |
| 2507 | 2496 | ||
| 2508 | @defun face-inverse-video-p face &optional frame | 2497 | @defun face-inverse-video-p face &optional frame inherit |
| 2509 | This function returns non-@code{nil} if face @var{face} specifies | 2498 | This function returns non-@code{nil} if face @var{face} specifies |
| 2510 | a non-@code{nil} @code{:inverse-video} attribute. | 2499 | a non-@code{nil} @code{:inverse-video} attribute. |
| 2511 | @end defun | 2500 | @end defun |