From bcc4cc3362fdb0f2b299087af5e7b31b92862fbb Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 28 Mar 2021 16:26:21 +0300 Subject: [PATCH] Doc fixes for 'face-foreground' and 'face-background'. * lisp/faces.el (face-foreground, face-background): Clarify how a face specified in INHERIT arg is used. (Bug#47437) --- lisp/faces.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/faces.el b/lisp/faces.el index 1813f8f7365..794343e88a9 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -503,7 +503,8 @@ If INHERIT is t, and FACE doesn't define a foreground color, then any foreground color that FACE inherits through its `:inherit' attribute is considered as well; however the return value may still be nil. If INHERIT is a face or a list of faces, then it is used to try to - resolve an unspecified foreground color. + resolve an unspecified foreground color, in addition to using any +inherited color. To ensure that a valid color is always returned, use a value of `default' for INHERIT; this will resolve any unspecified values by @@ -523,7 +524,8 @@ If INHERIT is t, and FACE doesn't define a background color, then any background color that FACE inherits through its `:inherit' attribute is considered as well; however the return value may still be nil. If INHERIT is a face or a list of faces, then it is used to try to - resolve an unspecified background color. + resolve an unspecified background color, in addition to using any +inherited color. To ensure that a valid color is always returned, use a value of `default' for INHERIT; this will resolve any unspecified values by -- 2.39.2