Function: modify-face

modify-face is an interactive and byte-compiled function defined in faces.el.gz.

Signature

(modify-face &optional FACE FOREGROUND BACKGROUND STIPPLE BOLD-P ITALIC-P UNDERLINE INVERSE-P FRAME)

Documentation

Modify attributes of faces interactively.

If optional argument FRAME is nil or omitted, modify the face used for newly created frame, i.e. the global face. For non-interactive use, set-face-attribute is preferred. When called from Lisp, if FACE is nil, all arguments but FRAME are ignored and the face and its settings are obtained by querying the user.

Probably introduced at or before Emacs version 19.29.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/faces.el.gz
(defun modify-face (&optional face foreground background stipple
			      bold-p italic-p underline inverse-p frame)
  "Modify attributes of faces interactively.
If optional argument FRAME is nil or omitted, modify the face used
for newly created frame, i.e. the global face.
For non-interactive use, `set-face-attribute' is preferred.
When called from Lisp, if FACE is nil, all arguments but FRAME are ignored
and the face and its settings are obtained by querying the user."
  (interactive)
  (if face
      (set-face-attribute face frame
			  :foreground (or foreground 'unspecified)
			  :background (or background 'unspecified)
			  :stipple stipple
			  :weight (if bold-p 'bold 'normal)
			  :slant (if italic-p 'italic 'normal)
			  :underline underline
			  :inverse-video inverse-p)
    (setq face (read-face-name "Modify face" (face-at-point t)))
    (apply #'set-face-attribute face frame
	   (read-all-face-attributes face frame))))