GNU bug report logs - #40336
default face spec doesn't get overriden

Previous Next

Package: emacs;

Reported by: Bad Blue Bull <ibmbull <at> yandex.ru>

Date: Mon, 30 Mar 2020 22:39:01 UTC

Severity: normal

Merged with 18074

Found in version 24.3.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Bad Blue Bull <ibmbull <at> yandex.ru>
Cc: 40336 <at> debbugs.gnu.org
Subject: bug#40336: default face spec doesn't get overriden
Date: Thu, 02 Apr 2020 22:36:08 +0300
> From: Bad Blue Bull <ibmbull <at> 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))))




This bug report was last modified 4 years and 267 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.