# HG changeset patch # User Chong Yidong # Date 1224263671 0 # Node ID 72d21af5dec4087c0d71a77ffa663d0e8f5cd591 # Parent 0a3f18739def4c29619952d9c06fbf0fa24b8580 (face-spec-set-2): Don't pass invalid attributes to set-face-attribute. diff -r 0a3f18739def -r 72d21af5dec4 lisp/faces.el --- a/lisp/faces.el Fri Oct 17 17:14:03 2008 +0000 +++ b/lisp/faces.el Fri Oct 17 17:14:31 2008 +0000 @@ -1556,7 +1556,14 @@ (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.