I took the following from this site.

(progn ;; Make whitespace-mode with very basic background coloring for whitespaces. ;; http://ergoemacs.org/emacs/whitespace-mode.html (setq whitespace-style (quote (face spaces tabs newline space-mark tab-mark newline-mark ))) ;; Make whitespace-mode and whitespace-newline-mode use “¶” for end of line char and “▷” for tab. (setq whitespace-display-mappings ;; all numbers are unicode codepoint in decimal. e.g. (insert-char 182 1) '( (space-mark 32 [183] [46]) ; SPACE 32 「 」, 183 MIDDLE DOT 「·」, 46 FULL STOP 「.」 (newline-mark 10 [182 10]) ; LINE FEED, (tab-mark 9 [9655 9] [92 9]) ; tab ))) The problem is whitespace-mode highlights every position where a space was. How can I disable the highlighting ?

  • 1
    M-x whitespace-mode toggles the mode on/off. M-x customize-option whitespace-style to customize which highlighting to use. C-h f whitespace-mode for more info. And consult the Emacs manual: C-h r.
    – Drew
    Aug 15, 2017 at 0:24

1 Answer 1


Quoting from the manual:

The kinds of whitespace visualized are determined by the list variable whitespace-style. Individual elements in that list can be toggled on or off in the current buffer by typing M-x whitespace-toggle-options.

You're setting whitespace-style with this code:

(setq whitespace-style (quote (face spaces tabs newline space-mark tab-mark newline-mark)))

Remove spaces to disable highlighting and remove space-mark to disable marking spaces with the dot.

  • Removing spaces solved the problem Aug 15, 2017 at 13:23

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.