]> code.delx.au - gnu-emacs/blobdiff - lisp/faces.el
(face-spec-set): Interpret a nil in specs for
[gnu-emacs] / lisp / faces.el
index e93bc2ae518b072863ac42d1a7684eff43ac1477..491410992e9a8bb5544b48e2be76c46860c10d2b 100644 (file)
@@ -1230,6 +1230,10 @@ If SPEC is nil, do nothing."
        (case attribute
          (:bold (setq attribute :weight value (if value 'bold 'normal)))
          (:italic (setq attribute :slant value (if value 'italic 'normal)))
+         ((:foreground :background)
+          ;; Compatibility with 20.x.  Some bogus face specs seem to 
+          ;; exist containing things like `:foreground nil'.
+          (if (null value) (setq value 'unspecified)))
          (t (unless (assq attribute face-x-resources)
               (setq attribute nil))))
        (when attribute