From: Gerd Moellmann Date: Mon, 18 Dec 2000 15:05:02 +0000 (+0000) Subject: (face-spec-set): Interpret a nil in specs for X-Git-Tag: emacs-pretest-21.0.95~426 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c242484757207cdfd62099c4cbfd04074e61c4a3;p=emacs.git (face-spec-set): Interpret a nil in specs for foreground and background colors as `unspecified', for compatibility with 20.x. --- diff --git a/lisp/faces.el b/lisp/faces.el index e93bc2ae518..491410992e9 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -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