Function: buffer-face-mode

buffer-face-mode is an autoloaded, interactive and byte-compiled function defined in face-remap.el.gz.

Signature

(buffer-face-mode &optional ARG)

Documentation

Minor mode for a buffer-specific default face.

This is a minor mode. If called interactively, toggle the Buffer-Face mode mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable the mode.

If called from Lisp, toggle the mode if ARG is toggle. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number.

To check whether the minor mode is enabled in the current buffer, evaluate buffer-face-mode(var)/buffer-face-mode(fun).

The mode's hook is called both when the mode is enabled and when it is disabled.

When enabled, the face specified by the variable buffer-face-mode-face is used to display the buffer text.

Probably introduced at or before Emacs version 23.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/face-remap.el.gz
;;;###autoload
(define-minor-mode buffer-face-mode
  "Minor mode for a buffer-specific default face.

When enabled, the face specified by the variable
`buffer-face-mode-face' is used to display the buffer text."
  :lighter " BufFace"
  (when buffer-face-mode-remapping
    (face-remap-remove-relative buffer-face-mode-remapping))
  (setq buffer-face-mode-remapping
	(and buffer-face-mode
	     (face-remap-add-relative 'default buffer-face-mode-face)))
  (force-window-update (current-buffer)))