bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#40336: default face spec doesn't get overriden


From: Eli Zaretskii
Subject: bug#40336: default face spec doesn't get overriden
Date: Thu, 02 Apr 2020 22:36:08 +0300

> From: Bad Blue Bull <ibmbull@yandex.ru>
> Date: Tue, 31 Mar 2020 01:38:40 +0300
> 
> (progn
>   (face-spec-set 'zzz
>                '((default  :background "red")
>                  (((background dark)) :weight bold :background "black" 
> :foreground "White"  )
>                  (((background light)) :weight bold :background "yellow" 
> :foreground "Black"  )
>                  ))
> 
>   (insert (propertize "XXX" 'face 'zzz)))
> 
> 
> Eval it and see default background gets applied despite it should be 
> overriden by a spec line that matches terminal's background.

Thanks.  Does the patch below fix that?

diff --git a/lisp/faces.el b/lisp/faces.el
index 9a49ea8..e707f6f 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -1560,7 +1560,7 @@ face-spec-choose
     ;; return it to the caller. Since there will most definitely be something 
to
     ;; return in this case, there's no need to know/check if a match was found.
     (if defaults
-       (append result defaults)
+       (append defaults result)
       (if match-found
          result
        no-match-retval))))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]