Subject: Re: bug#13476: 24.3.50; Reverting scroll-bar face customization has no effect

From: Mauro Aranda <[email-masked]>
Date: Fri, 30 Oct 2020 11:18:01 -0300

Eli Zaretskii <[email-masked]> writes:

>> From: Mauro Aranda <[email-masked]>
>> Date: Fri, 30 Oct 2020 10:20:20 -0300
>> Cc: [email-masked]
>>
>> So I'm thinking that perhaps an OK solution, at least for the scroll-bar
>> face, would be to give it a similar definition to that of the cursor
>> face.
>
> Yes, please try that.  If it fixes this minor problem, and doesn't
> produce any unintended effects, it is IMO a fine solution for this
> issue.

I've tried the attached patch.  Now reverting the foreground color
works, and I haven't seen unintended effects so far.
From 18e7e3002f014a154ef5e307847cd690d0277c04 Mon Sep 17 00:00:00 2001
From: Mauro Aranda <[email-masked]>
Date: Fri, 30 Oct 2020 11:13:34 -0300
Subject: [PATCH] Give the scroll-bar face a non-trivial spec

* lisp/faces.el (scroll-bar): Give it a non-trivial spec, so when
resetting it to its face-defface-spec, we effectively reset it.
(Bug#13476)
---
 lisp/faces.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/faces.el b/lisp/faces.el
index 0ce9532270..728f8b0fe6 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -2716,9 +2716,11 @@ fringe
   :group 'frames
   :group 'basic-faces)
 
-(defface scroll-bar '((t nil))
+(defface scroll-bar
+  '((((background light)) :foreground "black")
+    (((background dark))  :foreground "white"))
   "Basic face for the scroll bar colors under X."
-  :version "21.1"
+  :version "28.1"
   :group 'frames
   :group 'basic-faces)
 
-- 
2.29.0