> Maybe a more systematic way to proceed would be to disable NBSP-escaping > in read-only buffers (but it could sometimes be confusing, too).
Disabling NBSP highlighting in read-only buffers makes some sense. The reason is that in read-only buffers users usually can't fix NBSP (if it is wrong). I used such a rule for enabling show-trailing-whitespace to show trailing whitespace only in editable buffers. But sometimes this rule fails: some read-only buffers can be switched to edit mode, some editable buffers are not writable. So finally I reached the rule that sets the buffer-local show-trailing-whitespace only on files in specified subdirectories. This shows that show-trailing-whitespace is flexible enough to allow arbitrary customization, but escape-glyph is not. There is a need for a buffer-local variable similar to show-trailing-whitespace to enable/disable highlighting of control characters and nbsp with escape-glyph face on a per-buffer basis. -- Juri Linkov http://www.jurta.org/emacs/ _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel