So I opened a c++ script made in Xubuntu and every tab character was highlighted with grey. That doesn't happen when I open scripts made on Windows. How do I stop Emacs from highlighting them, it's very distracting? Here is a picture of what it looks like: example

  • A guess is that you're using whitespace-mode, which is highlighting the Tab chars. Check the mode you're using for the buffers in GNU/Linux vs Microsoft Windows. Sounds like one of them turns on whitespace-mode and the other doesn't. Just a guess.
    – Drew
    May 6, 2021 at 17:46
  • 1
    Put the cursor on one of those Tab chars and hit C-u C-x =. The *Help* will tell you what faces are used to highlight them. Work from that info to find out what code (maybe whitespace-mode) is doing the highlighting.
    – Drew
    May 6, 2021 at 17:47
  • Thank you! I'll check the settings and preferences as well.
    – Philip
    May 6, 2021 at 18:08

1 Answer 1


You have whitespace-mode turned on. Turn it off.


Your Answer

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

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