Function: buffer-face-set
buffer-face-set is an autoloaded, interactive and byte-compiled
function defined in face-remap.el.gz.
Signature
(buffer-face-set &rest SPECS)
Documentation
Enable buffer-face-mode(var)/buffer-face-mode(fun), using face specs SPECS.
Each argument in SPECS should be a face, i.e. either a face name
or a property list of face attributes and values. If more than
one face is listed, that specifies an aggregate face, like in a
face text property. If SPECS is nil or omitted, disable
buffer-face-mode(var)/buffer-face-mode(fun).
This function makes the variable buffer-face-mode-face buffer
local, and sets it to FACE.
Probably introduced at or before Emacs version 23.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/face-remap.el.gz
;;;###autoload
(defun buffer-face-set (&rest specs)
"Enable `buffer-face-mode', using face specs SPECS.
Each argument in SPECS should be a face, i.e. either a face name
or a property list of face attributes and values. If more than
one face is listed, that specifies an aggregate face, like in a
`face' text property. If SPECS is nil or omitted, disable
`buffer-face-mode'.
This function makes the variable `buffer-face-mode-face' buffer
local, and sets it to FACE."
(interactive (list (read-face-name "Set buffer face" (face-at-point t))))
(while (and (consp specs) (null (cdr specs)))
(setq specs (car specs)))
(if (null specs)
(buffer-face-mode 0)
(setq-local buffer-face-mode-face specs)
(buffer-face-mode t)))