X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/ba7eaddad2b98ac898016624ca47ba43b63c7f0a..d6046e457f578c8494afdd0f3a7ab1282927be13:/lisp/faces.el diff --git a/lisp/faces.el b/lisp/faces.el index 2e3529fabf..4a7d951aea 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -149,7 +149,8 @@ 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 (or (query-fontset font) + (setq font (or (and (not (eq window-system 'w32)) + (resolve-fontset-name font)) (x-resolve-font-name font 'default frame)))) (internal-set-face-1 face 'font font 3 frame) ;; Record that this face's font was set explicitly, not automatically, @@ -164,9 +165,8 @@ 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 (or (and (fontset-name-p font) - (or (query-fontset font) - (instantiate-fontset font))) + (setq font (or (and (not (eq window-system 'w32)) + (resolve-fontset-name font)) (x-resolve-font-name font 'default frame)))) (internal-set-face-1 face 'font font 3 frame)) @@ -1138,7 +1138,8 @@ selected frame." (while (not (eobp)) (insert " ") (forward-line 1)))) - (goto-char (point-min)))) + (goto-char (point-min))) + (print-help-return-message)) ;; If the *Faces* buffer appears in a different frame, ;; copy all the face definitions from FRAME, ;; so that the display will reflect the frame that was selected. @@ -1168,7 +1169,8 @@ selected frame." (let ((doc (face-documentation face))) (if doc (princ doc) - (princ "not documented as a face."))))) + (princ "not documented as a face."))) + (print-help-return-message))) ;;; Setting a face based on a SPEC. @@ -1345,6 +1347,19 @@ If FRAME is nil, the current FRAME is used." ;; Put the geometry parameters at the end. ;; Copy default-frame-alist so that they go after it. (setq parameters (append parameters default-frame-alist parsed))))) + + (if default-enable-multibyte-characters + ;; If an ASCII font is specified in PARAMETERS, we try to create + ;; a fontset from it, and use it for the new frame. + (condition-case nil + (let ((font (cdr (assq 'font parameters)))) + (if (and font + (not (query-fontset font))) + (setq parameters + (cons (cons 'font (create-fontset-from-ascii-font font)) + parameters)))) + (error nil))) + (let (frame) (if (null global-face-data) (progn @@ -1474,6 +1489,7 @@ examine the brightness for you." ;; This applies only to faces with global color specifications ;; that are not simple constants. (defun frame-update-face-colors (frame) + (frame-set-background-mode frame) (let ((faces global-face-data)) (while faces (condition-case nil