example, if `:slant' appears before `:height', font selection first
tries to find a font with a suitable slant, even if this results in
a font height that isn't optimal."
- :tag "Font selection order."
+ :tag "Font selection order"
:type '(list symbol symbol symbol symbol)
:group 'font-selection
:set #'(lambda (symbol value)
Each element has the form (FAMILY ALTERNATIVE1 ALTERNATIVE2 ...).
If fonts of family FAMILY can't be loaded, try ALTERNATIVE1, then
ALTERNATIVE2 etc."
- :tag "Alternative font families to try."
+ :tag "Alternative font families to try"
:type '(repeat (repeat string))
:group 'font-selection
:set #'(lambda (symbol value)
If fonts of registry REGISTRY can be loaded, font selection
tries to find a best matching font among all fonts of registry
REGISTRY, ALTERNATIVE1, ALTERNATIVE2, and etc."
- :tag "Alternative font registries to try."
+ :tag "Alternative font registries to try"
:type '(repeat (repeat string))
:version "21.1"
:group 'font-selection
If NEW-FACE already exists as a face, it is modified to be like
OLD-FACE. If it doesn't already exist, it is created.
-If the optional argument FRAME is given as a frame, NEW-FACE is
+If the optional argument FRAME is given as a frame, NEW-FACE is
changed on FRAME only.
If FRAME is t, the frame-independent default specification for OLD-FACE
is copied to NEW-FACE.
;; support faces in display table entries.
(defun face-id (face &optional frame)
- "Return the interNal ID of face with name FACE.
+ "Return the internal ID of face with name FACE.
If optional argument FRAME is nil or omitted, use the selected frame."
(check-face face)
(get face 'face))
;; The name list-faces would be more consistent, but let's avoid a
;; conflict with Lucid, which uses that name differently.
+(defvar help-xref-stack)
(defun list-faces-display ()
"List all faces, using the same sample text in each.
The sample text is a string that comes from the variable
according to the `background-mode' and `display-type' frame parameters."
(let* ((bg-resource
(and window-system
- (x-get-resource ".backgroundMode" "BackgroundMode")))
+ (x-get-resource "backgroundMode" "BackgroundMode")))
(bg-color (frame-parameter frame 'background-color))
(bg-mode
(cond (frame-background-mode)
(defun face-set-after-frame-default (frame)
"Set frame-local faces of FRAME from face specs and resources.
Initialize colors of certain faces from frame parameters."
+ ;; Don't let frame creation fail because of an invalid face spec.
(dolist (face (face-list))
- (when (not (equal face 'default))
- (face-spec-set face (face-user-default-spec face) frame)
- (internal-merge-in-global-face face frame)
- (when (and (memq window-system '(x w32 mac))
- (or (not (boundp 'inhibit-default-face-x-resources))
- (not (eq face 'default))))
- (make-face-x-resource-internal face frame))))
-
+ (condition-case ()
+ (when (not (equal face 'default))
+ (face-spec-set face (face-user-default-spec face) frame)
+ (internal-merge-in-global-face face frame)
+ (when (and (memq window-system '(x w32 mac))
+ (or (not (boundp 'inhibit-default-face-x-resources))
+ (not (eq face 'default))))
+ (make-face-x-resource-internal face frame)))
+ (error nil)))
;; Initialize attributes from frame parameters.
(let ((params '((foreground-color default :foreground)
(background-color default :background)