changeset 34682:4130c0ad0a5e

(face-spec-set): Interpret a nil in specs for foreground and background colors as `unspecified', for compatibility with 20.x.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 18 Dec 2000 15:05:02 +0000
parents 34b048e564c0
children 9086eef12291
files lisp/faces.el
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/faces.el	Mon Dec 18 13:57:32 2000 +0000
+++ b/lisp/faces.el	Mon Dec 18 15:05:02 2000 +0000
@@ -1230,6 +1230,10 @@
 	(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