(not (internal-lisp-face-empty-p face frame)))
+(defun face-list-p (face-or-list)
+ "True if FACE-OR-LIST is a list of faces.
+Return nil if FACE-OR-LIST is a non-nil atom, or a cons cell whose car
+is either 'foreground-color, 'background-color, or a keyword."
+ ;; The logic of merge_face_ref (xfaces.c) is recreated here.
+ (and (listp face-or-list)
+ (not (memq (car face-or-list)
+ '(foreground-color background-color)))
+ (not (keywordp (car face-or-list)))))
+
+
\f
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Setting face attributes from X resources.
`:foundry'
VALUE must be a string specifying the font foundry,
-e.g. ``adobe''. If a font foundry is specified, wild-cards `*'
+e.g., \"adobe\". If a font foundry is specified, wild-cards `*'
and `?' are allowed.
`:width'
foreground color. :style may be omitted, which means to use a line.
FRAME nil or not specified means change face on all frames.
-Use `set-face-attribute' to ``unspecify'' underlining."
+Use `set-face-attribute' to “unspecify” underlining."
(interactive (read-face-and-attribute :underline))
(set-face-attribute face frame :underline underline))
INVERSE-VIDEO-P non-nil means FACE displays explicitly in inverse video.
INVERSE-VIDEO-P nil means FACE explicitly is not in inverse video.
FRAME nil or not specified means change face on all frames.
-Use `set-face-attribute' to ``unspecify'' the inverse video attribute."
+Use `set-face-attribute' to “unspecify” the inverse video attribute."
(interactive
(let ((list (read-face-and-attribute :inverse-video)))
(list (car list) (if (cadr list) t))))
(get-char-property (point) 'face))))
(cond ((facep faceprop)
(push faceprop faces))
- ((and (listp faceprop)
- ;; Don't treat an attribute spec as a list of faces.
- (not (keywordp (car faceprop)))
- (not (memq (car faceprop)
- '(foreground-color background-color))))
+ ((face-list-p faceprop)
(dolist (face faceprop)
(if (facep face)
(push face faces))))))
"Create and return a frame with frame parameters PARAMETERS.
If PARAMETERS specify a frame name, handle X geometry resources
for that name. If PARAMETERS includes a `reverse' parameter, or
-the X resource ``reverseVideo'' is present, handle that."
+the X resource \"reverseVideo\" is present, handle that."
(setq parameters (x-handle-named-frame-geometry parameters))
(let* ((params (copy-tree parameters))
(visibility-spec (assq 'visibility parameters))
(value (cdr (assq param-name parameters))))
(if value
(set-face-attribute (nth 1 param) frame
- (nth 2 param) value))))
- (frame-can-run-window-configuration-change-hook frame t)))
+ (nth 2 param) value))))))
(defun tty-handle-reverse-video (frame parameters)
"Handle the reverse-video frame parameter for terminal frames."