Variable: whitespace-mode

whitespace-mode is a buffer-local variable defined in whitespace.el.gz.

Documentation

Non-nil if Whitespace mode is enabled.

Use the command whitespace-mode(var)/whitespace-mode(fun) to change this variable.

View in manual

Probably introduced at or before Emacs version 23.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/whitespace.el.gz
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; User commands - Local mode


;;;###autoload
(define-minor-mode whitespace-mode
  "Toggle whitespace visualization (Whitespace mode).

See also `whitespace-style', `whitespace-newline' and
`whitespace-display-mappings'.

This mode uses a number of faces to visualize the whitespace; see
the customization group `whitespace' for details."
  :lighter    " ws"
  :init-value nil
  :global     nil
  :group      'whitespace
  (cond
   (noninteractive			; running a batch job
    (setq whitespace-mode nil))
   (whitespace-mode			; whitespace-mode on
    (whitespace-turn-on)
    (whitespace-action-when-on))
   (t					; whitespace-mode off
    (whitespace-turn-off))))