# HG changeset patch # User Richard M. Stallman # Date 787499391 0 # Node ID 5fc240a3e4a05905be6f82768f607a4e2b52bfa8 # Parent 04425b872c5b3e5f3cee724da35b966f2a009bf4 (face-initialize): Test for framep not t or nil. (set-face-font): Pass `default' as face to x-resolve-font-name. (x-resolve-font-name): Better error message when FACE doesn't specify the font. diff -r 04425b872c5b -r 5fc240a3e4a0 lisp/faces.el --- a/lisp/faces.el Thu Dec 15 12:36:03 1994 +0000 +++ b/lisp/faces.el Thu Dec 15 13:49:51 1994 +0000 @@ -109,7 +109,7 @@ If the optional FRAME argument is provided, change only in that frame; otherwise change each frame." (interactive (internal-face-interactive "font")) - (if (stringp font) (setq font (x-resolve-font-name font face frame))) + (if (stringp font) (setq font (x-resolve-font-name font 'default frame))) (internal-set-face-1 face 'font font 3 frame)) (defun set-face-foreground (face color &optional frame) @@ -520,8 +520,8 @@ All wildcards in PATTERN become substantiated. If PATTERN is nil, return the name of the frame's base font, which never contains wildcards. -Given optional arguments FACE and FRAME, try to return a font which is -also the same size as FACE on FRAME." +Given optional arguments FACE and FRAME, return a font which is +also the same size as FACE on FRAME, or fail." (or (symbolp face) (setq face (face-name face))) (and (eq frame t) @@ -532,7 +532,9 @@ (or fonts (if face (error "No fonts matching pattern are the same size as `%s'" - face) + (if (null (face-font face)) + (cdr (assq 'font (frame-parameters frame))) + face)) (error "No fonts match `%s'" pattern))) (car fonts)) (cdr (assq 'font (frame-parameters (selected-frame)))))) @@ -867,7 +869,7 @@ (let ((frames (frame-list))) (while frames - (if (framep (car frames)) + (if (not (memq (framep (car frames)) '(t nil))) (let ((frame (car frames)) (rest global-face-data)) (while rest