aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorGlenn Morris2012-11-21 00:39:08 -0800
committerGlenn Morris2012-11-21 00:39:08 -0800
commit1bf335cf4327486931b6d4fe42fe1bd3c14406cf (patch)
treece1b0a6dae728a6b00c9f5e5af3e3421f66c9e1d /doc
parent3ca2f1bf25b46877497c34c70b36dd511678e29b (diff)
downloademacs-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/ChangeLog2
-rw-r--r--doc/lispref/display.texi41
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}.
2453don't specify @var{frame}, they refer to the selected frame; @code{t} 2453don't specify @var{frame}, they refer to the selected frame; @code{t}
2454refers to the default data for new frames. They return the symbol 2454refers 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
2456attribute. 2456attribute. If @var{inherit} is @code{nil}, only an attribute directly
2457defined by the face is returned. If @var{inherit} is non-@code{nil},
2458any faces specified by its @code{:inherit} attribute are considered as
2459well, and if @var{inherit} is a face or a list of faces, then they are
2460also considered, until a specified attribute is found. To ensure that
2461the return value is always specified, use a value of @code{default} for
2462@var{inherit}.
2463
2464@defun face-font face &optional frame
2465This 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
2460These functions return the foreground color (or background color, 2470These functions return the foreground color (or background color,
2461respectively) of face @var{face}, as a string. 2471respectively) of face @var{face}, as a string.
2462
2463If @var{inherit} is @code{nil}, only a color directly defined by the face is
2464returned. If @var{inherit} is non-@code{nil}, any faces specified by its
2465@code{:inherit} attribute are considered as well, and if @var{inherit}
2466is a face or a list of faces, then they are also considered, until a
2467specified color is found. To ensure that the return value is always
2468specified, 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
2472This function returns the name of the background stipple pattern of face 2475This 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
2475If @var{inherit} is @code{nil}, only a stipple directly defined by the
2476face is returned. If @var{inherit} is non-@code{nil}, any faces
2477specified by its @code{:inherit} attribute are considered as well, and
2478if @var{inherit} is a face or a list of faces, then they are also
2479considered, until a specified stipple is found. To ensure that the
2480return 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
2485This 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
2489This function returns a non-@code{nil} value if the @code{:weight} 2480This function returns a non-@code{nil} value if the @code{:weight}
2490attribute of @var{face} is bolder than normal (i.e., one of 2481attribute 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
2496This function returns a non-@code{nil} value if the @code{:slant} 2487This function returns a non-@code{nil} value if the @code{:slant}
2497attribute of @var{face} is @code{italic} or @code{oblique}, and 2488attribute 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
2504This function returns non-@code{nil} if face @var{face} specifies 2493This function returns non-@code{nil} if face @var{face} specifies
2505a non-@code{nil} @code{:underline} attribute. 2494a 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
2509This function returns non-@code{nil} if face @var{face} specifies 2498This function returns non-@code{nil} if face @var{face} specifies
2510a non-@code{nil} @code{:inverse-video} attribute. 2499a non-@code{nil} @code{:inverse-video} attribute.
2511@end defun 2500@end defun