1

Is there any way to disable syntax highlighting of the buffer (which I do by disabling the font-lock-mode) and having the trailing whitespaces highlighted in red? or at least show a unicode dot?

(When I disable the font-lock-mode, it also disables the highlighting for the whitespace mode.)

1 Answer 1

2

having the trailing whitespaces highlighted in red

C-hv show-trailing-whitespace does not depend upon font-lock-mode.

Enabling that and disabling font-lock-mode is fine, AFAICS.

Parts of whitespace-mode also work without font-lock-mode being enabled.

show a unicode dot

(setq whitespace-style '(space-mark))
2
  • setting that variable only does not give it a color as I tested it with emacs -Q. (setq whitespace-style '(space-mark)) shows a dot for all spaces, whereas I only want the trailing whitespaces to be marked as dot.
    – ali b
    Commented Mar 20 at 16:46
  • I cannot replicate your problem with show-trailing-whitespace. It 100% works under emacs -Q for me. It uses the trailing-whitespace face, which has a red background by default.
    – phils
    Commented Mar 20 at 20:51

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.