changeset 8109:9bc00e1f0f3e

(make-face-italic, make-face-bold): Don't bind f2 here. (make-face-bold-internal, make-face-italic-internal): Bind f2 here. (make-face-bold-italic-internal, make-face-italic-internal) (make-face-bold-internal): New arg `font'. Callers changed.
author Richard M. Stallman <rms@gnu.org>
date Fri, 01 Jul 1994 17:31:42 +0000
parents 7b9d245c5978
children bf6ecdddf78b
files lisp/faces.el
diffstat 1 files changed, 18 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/faces.el	Fri Jul 01 17:14:19 1994 +0000
+++ b/lisp/faces.el	Fri Jul 01 17:31:42 1994 +0000
@@ -518,7 +518,7 @@
 			      '(bold italic) '(bold))
 		     t)
     (let ((ofont (face-font face frame))
-	  font f2)
+	  font)
       (if (null frame)
 	  (let ((frames (frame-list)))
 	    ;; Make this face bold in global-face-data.
@@ -535,16 +535,17 @@
 	(setq font (or font
 		       (face-font 'default frame)
 		       (cdr (assq 'font (frame-parameters frame)))))
-	(make-face-bold-internal face frame))
+	(make-face-bold-internal face frame font))
       (or (not (equal ofont (face-font face)))
 	  (and (not noerror)
 	       (error "No bold version of %S" font))))))
 
-(defun make-face-bold-internal (face frame)
-  (or (and (setq f2 (x-make-font-bold font))
-	   (internal-try-face-font face f2 frame))
-      (and (setq f2 (x-make-font-demibold font))
-	   (internal-try-face-font face f2 frame))))
+(defun make-face-bold-internal (face frame font)
+  (let (f2)
+    (or (and (setq f2 (x-make-font-bold font))
+	     (internal-try-face-font face f2 frame))
+	(and (setq f2 (x-make-font-demibold font))
+	     (internal-try-face-font face f2 frame)))))
 
 (defun make-face-italic (face &optional frame noerror)
   "Make the font of the given face be italic, if possible.  
@@ -555,7 +556,7 @@
 			      '(bold italic) '(italic))
 		     t)
     (let ((ofont (face-font face frame))
-	  font f2)
+	  font)
       (if (null frame)
 	  (let ((frames (frame-list)))
 	    ;; Make this face italic in global-face-data.
@@ -572,16 +573,17 @@
 	(setq font (or font
 		       (face-font 'default frame)
 		       (cdr (assq 'font (frame-parameters frame)))))
-	(make-face-italic-internal face frame))
+	(make-face-italic-internal face frame font))
       (or (not (equal ofont (face-font face)))
 	  (and (not noerror)
 	       (error "No italic version of %S" font))))))
 
-(defun make-face-italic-internal (face frame)
-  (or (and (setq f2 (x-make-font-italic font))
-	   (internal-try-face-font face f2 frame))
-      (and (setq f2 (x-make-font-oblique font))
-	   (internal-try-face-font face f2 frame))))
+(defun make-face-italic-internal (face frame font)
+  (let (f2)
+    (or (and (setq f2 (x-make-font-italic font))
+	     (internal-try-face-font face f2 frame))
+	(and (setq f2 (x-make-font-oblique font))
+	     (internal-try-face-font face f2 frame)))))
 
 (defun make-face-bold-italic (face &optional frame noerror)
   "Make the font of the given face be bold and italic, if possible.  
@@ -607,12 +609,12 @@
 	(setq font (or font
 		       (face-font 'default frame)
 		       (cdr (assq 'font (frame-parameters frame)))))
-	(make-face-bold-italic-internal face frame))
+	(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))))))
 
-(defun make-face-bold-italic-internal (face frame)
+(defun make-face-bold-italic-internal (face frame font)
   (let (f2 f3)
     (or (and (setq f2 (x-make-font-italic font))
 	     (not (equal font f2))