Mercurial > emacs
changeset 98801:72d21af5dec4
(face-spec-set-2): Don't pass invalid attributes to set-face-attribute.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Fri, 17 Oct 2008 17:14:31 +0000 |
parents | 0a3f18739def |
children | b6dc8bf48796 |
files | lisp/faces.el |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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.