From 4f77c25dfe39469d9b311533b0fe468a846ed748 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 17 Oct 2008 17:14:31 +0000 Subject: [PATCH] (face-spec-set-2): Don't pass invalid attributes to set-face-attribute. --- lisp/faces.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/faces.el b/lisp/faces.el index 0db620c2fe5..cab7f5b52cc 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -1556,7 +1556,14 @@ then the override spec." (defun face-spec-set-2 (face frame spec) "Set the face attributes of FACE on FRAME according to SPEC." - (apply 'set-face-attribute face frame (face-spec-choose spec frame))) + (let* ((spec (face-spec-choose spec frame)) + attrs) + (while spec + (when (assq (car spec) face-x-resources) + (push (car spec) attrs) + (push (cadr spec) attrs)) + (setq spec (cddr spec))) + (apply 'set-face-attribute face frame (nreverse attrs)))) (defun face-attr-match-p (face attrs &optional frame) "Return t if attributes of FACE match values in plist ATTRS. -- 2.39.5