Subject: bug#31886: 27.0.50; some face can't be customized after the recent updates

From: Andy Moreton <[email-masked]>
Date: Mon, 18 Jun 2018 22:03:21 +0100

On Mon 18 Jun 2018, Markus FFM wrote:

> sorry, no -Q possible.
>
> options/customize emacs/faces matching <some faces>
> customizing/storing (up to now everythings fine)
> restarting emacs
> all customizations are gone.
>
> customizations in (compiled) init.el:
> (custom-set-faces
>  ;; custom-set-faces was added by Custom.
>  ;; If you edit it by hand, you could mess it up, so be careful.
>  ;; Your init file should contain only one such instance.
>  ;; If there is more than one, they won't work right.
>  '(custom-comment ((t (:background "font-lock-comment-face"))))
>  '(custom-comment-tag ((t (:foreground "font-lock-comment-face"))))
>  '(font-lock-comment-face ((t (:foreground "grey42"))))
>  '(region ((t (:background "pale goldenrod" :distant-foreground "black")))))

This could be related to recent changes for handling of custom themes.
See http://lists.gnu.org/archive/html/emacs-devel/2018-06/msg00573.html.

Does this patch fix things for you ?

diff --git a/lisp/cus-face.el b/lisp/cus-face.el
index 039c1fafa7..54f5d51358 100644
--- a/lisp/cus-face.el
+++ b/lisp/cus-face.el
@@ -342,7 +342,7 @@ custom-theme-set-faces
 	;; is aliased to.
 	(if (get face 'face-alias)
 	    (setq face (get face 'face-alias)))
-	(if (custom--should-apply-setting theme)
+	(if (not (custom--should-apply-setting theme))
 	    ;; Just update theme settings.
 	    (custom-push-theme 'theme-face face theme 'set spec)
 	  ;; Update theme settings and set the face spec.