changeset 8732:58d6dc80af5c

(make-face-unbold, make-face-unitalic, make-face-bold, make-face-italic, make-face-bold-italic): Don't try to frob font if it's nil.
author Karl Heuer <kwzh@gnu.org>
date Wed, 14 Sep 1994 03:22:57 +0000
parents 7ebb77d4aff2
children 14b8f8a28ace
files lisp/faces.el
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/faces.el	Tue Sep 13 18:01:51 1994 +0000
+++ b/lisp/faces.el	Wed Sep 14 03:22:57 1994 +0000
@@ -544,7 +544,7 @@
 	(setq font (or font
 		       (face-font 'default frame)
 		       (cdr (assq 'font (frame-parameters frame)))))
-	(make-face-bold-internal face frame font))
+	(and font (make-face-bold-internal face frame font)))
       (or (not (equal ofont (face-font face)))
 	  (and (not noerror)
 	       (error "No bold version of %S" font))))))
@@ -582,7 +582,7 @@
 	(setq font (or font
 		       (face-font 'default frame)
 		       (cdr (assq 'font (frame-parameters frame)))))
-	(make-face-italic-internal face frame font))
+	(and font (make-face-italic-internal face frame font)))
       (or (not (equal ofont (face-font face)))
 	  (and (not noerror)
 	       (error "No italic version of %S" font))))))
@@ -618,7 +618,7 @@
 	(setq font (or font
 		       (face-font 'default frame)
 		       (cdr (assq 'font (frame-parameters frame)))))
-	(make-face-bold-italic-internal face frame font))
+	(and font (make-face-bold-italic-internal face frame font)))
       (or (not (equal ofont (face-font face)))
 	  (and (not noerror)
 	       (error "No bold italic version of %S" font))))))
@@ -672,7 +672,7 @@
 	(setq font1 (or font1
 			(face-font 'default frame)
 			(cdr (assq 'font (frame-parameters frame)))))
-	(setq font (x-make-font-unbold font1))
+	(setq font (and font1 (x-make-font-unbold font1)))
 	(if font (internal-try-face-font face font frame)))
       (or (not (equal ofont (face-font face)))
 	  (and (not noerror)
@@ -704,7 +704,7 @@
 	(setq font1 (or font1
 			(face-font 'default frame)
 			(cdr (assq 'font (frame-parameters frame)))))
-	(setq font (x-make-font-unitalic font1))
+	(setq font (and font1 (x-make-font-unitalic font1)))
 	(if font (internal-try-face-font face font frame)))
       (or (not (equal ofont (face-font face)))
 	  (and (not noerror)