]> code.delx.au - gnu-emacs/blobdiff - lisp/faces.el
(face-spec-set): Ignore invalid attributes like 20.x.
[gnu-emacs] / lisp / faces.el
index 3dc579ec0cc8deaf44c90a859d9f12a56f234c1c..0cec44b94d2f62de825fea493846533f388e0a89 100644 (file)
@@ -263,7 +263,6 @@ If FRAME is omitted or nil, use the selected frame."
     (:stipple
      (".attributeStipple" . "Face.AttributeStipple")
      (".attributeBackgroundPixmap" . "Face.AttributeBackgroundPixmap"))
-    (:font (".attributeFont" . "Face.AttributeFont"))
     (:bold (".attributeBold" . "Face.AttributeBold"))
     (:italic (".attributeItalic" . "Face.AttributeItalic"))
     (:font (".attributeFont" . "Face.AttributeFont")))
@@ -1167,8 +1166,11 @@ do it on all frames.  See `defface' for information about SPEC."
        ;; Support some old-style attribute names and values.
        (case attribute
          (:bold (setq attribute :weight value (if value 'bold 'normal)))
-         (:italic (setq attribute :slant value (if value 'italic 'normal))))
-       (setq params (cons attribute (cons value params))))
+         (:italic (setq attribute :slant value (if value 'italic 'normal)))
+         (t (unless (assq attribute face-x-resources)
+              (setq attribute nil))))
+       (when attribute
+         (setq params (cons attribute (cons value params)))))
       (setq attrs (cdr (cdr attrs))))
     (face-spec-reset-face face frame)
     (apply #'set-face-attribute face frame params)))