Function: whitespace-turn-on
whitespace-turn-on is a byte-compiled function defined in
whitespace.el.gz.
Signature
(whitespace-turn-on)
Documentation
Turn on whitespace visualization.
Source Code
;; Defined in /usr/src/emacs/lisp/whitespace.el.gz
(defun whitespace-turn-on ()
"Turn on whitespace visualization."
;; prepare local hooks
(add-hook 'write-file-functions #'whitespace-write-file-hook nil t)
;; create whitespace local buffer environment
(setq-local whitespace-font-lock-keywords nil)
(setq-local whitespace-display-table nil)
(setq-local whitespace-display-table-was-local nil)
(setq-local whitespace-active-style
(if (listp whitespace-style)
whitespace-style
(list whitespace-style)))
;; turn on whitespace
(when whitespace-active-style
(whitespace-color-on)
(whitespace-display-char-on)))