From 96616c048a224641d01c37bcb5fb7d0010c42ed9 Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Wed, 14 Sep 1994 03:22:57 +0000 Subject: [PATCH] (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. --- lisp/faces.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lisp/faces.el b/lisp/faces.el index 9af2a9a9371..a058292ab39 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -544,7 +544,7 @@ If NOERROR is non-nil, return nil on failure." (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 @@ If NOERROR is non-nil, return nil on failure." (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 @@ If NOERROR is non-nil, return nil on failure." (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 @@ If NOERROR is non-nil, return nil on failure." (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 @@ If NOERROR is non-nil, return nil on failure." (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) -- 2.39.5