From: Chong Yidong Date: Fri, 17 Oct 2008 17:14:31 +0000 (+0000) Subject: (face-spec-set-2): Don't pass invalid attributes to set-face-attribute. X-Git-Tag: emacs-pretest-23.0.90~2425 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4f77c25dfe39469d9b311533b0fe468a846ed748;p=emacs.git (face-spec-set-2): Don't pass invalid attributes to set-face-attribute. --- 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.