Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to use whitespace to detect wrong whitespace (i.e. trailing whitespace on line, tabs instead of spaces etc.).

However I would like to still have spaces displayed as spaces. I tried to use whitespace-space variable but I have not managed to do it. Is it possible? How to do it?

share|improve this question

What Whitespace mode displays is controlled by the whitespace-style variable. Remove spaces from that list. You can do it from the Customize interface (Convenience / Whitespace / Whitespace Style) or by hand:

(eval-after-load "whitespace" '(setq whitespace-style (delq 'spaces whitespace-style)))
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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