According to the Emacs manual (section 14.16 Useless Whitespace):

The kinds of whitespace visualized [in whitespace mode -- Evan] are determined by the list variable whitespace-style.

However, when I execute C-h v whitespace-style RET, no match is found.

How can I view the list of whitespace visualized in whitespace mode?

  • 1
    Try (require 'whitespace) first.
    – Basil
    Jun 29, 2017 at 12:08

1 Answer 1


If you look at the docstring of whitespace-mode (emphasis mine):

whitespace-mode is an interactive autoloaded compiled Lisp function in ‘whitespace.el’.

(whitespace-mode &optional ARG)

Toggle whitespace visualization (Whitespace mode). ...

The elisp manual section on autoloading begins with:

The autoload facility lets you register the existence of a function or macro, but put off loading the file that defines it. The first call to the function automatically loads the proper library, in order to install the real definition and other associated code, then runs the real definition as if it had been loaded all along.

So in this case, although the function whitespace-mode is visible, the whitespace library is not loaded and so variable whitespace-style is not defined. You can autoload the library by invoking function whitespace-mode, for example with M-x whitespace-mode.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.