changeset 29993:4e913c73fa7e

(hilit-lookup-face-create): Don't set face colors to nil.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 03 Jul 2000 07:49:30 +0000
parents c1a99b7c6085
children b5da88c41066
files lisp/hilit19.el
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/hilit19.el	Mon Jul 03 06:59:05 2000 +0000
+++ b/lisp/hilit19.el	Mon Jul 03 07:49:30 2000 +0000
@@ -622,8 +622,8 @@
       
       ;; catch errors if we can't allocate the color(s)
       (condition-case nil
-	  (progn (set-face-foreground 'scratch-face fgcolor)
-		 (set-face-background 'scratch-face bgcolor)
+	  (progn (and fgcolor (set-face-foreground 'scratch-face fgcolor))
+		 (and bgcolor (set-face-background 'scratch-face bgcolor))
 		 (copy-face 'scratch-face face)
 		 (put face 'basefont basefont))
 	(error (message "couldn't allocate color for '%s'"
@@ -635,7 +635,7 @@
 	  ;; we wanted, but ignore errors making the face bold or italic
 	  ;; if the font isn't available, there's nothing to do about it...
 	  (progn
-	    (set-face-font face nil frame)
+	    (set-face-font face basefont frame)
 	    (set-face-underline-p face (string-match "underline" fn))
 	    (if (string-match ".*bold" fn)
 		;; make face bold in all frames