[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [External] : Re: minor mode for highlighting character classes such
RE: [External] : Re: minor mode for highlighting character classes such as non-ascii (bug 47455)
Tue, 1 Jun 2021 16:49:21 +0000
> > In the context of bug 47455 the idea emerged that it can be useful
> > to have a minor mode that highlights non-ascii characters. I want
> > to ask hear for feedback: does such a mode already exist? Can it be
> > useful to have this minor mode more general such that the highlighted
> > character classes become configurable? Are there possible use cases
> > for this beyond non-ascii characters?
Eli> We already highlight some potentially confusing characters,
Eli> see no-break-char-display and faces nobreak-space and
OF> Highlighting characters that does not belong to certain
OF> coding system would be useful to me.
OF> Sometimes I work on source code encoded as UTF-8 but they
OF> must not contain characters not encodable by windows-1252.
OF> More precisely, string literals must be composed of
OF> characters encodable by windows-1252.
That highlighting of no-break chars is limited.
1. You can't specify which no-break chars you want to highlight,
and you can't highlight different such chars differently.
2. It is low-level highlighting, which doesn't use font-lock.
`whitespace.el' is similarly limited, e.g. coupling space and
hard-space chars, for highlighting.
More useful is something like what library `highlight-chars.el'
offers. You can highlight any chars you like, in any way you
like. You can highlight arbitrary chars, chars in char ranges,
char classes, or charsets.
Re: minor mode for highlighting character classes such as non-ascii (bug 47455), Daniel Martín, 2021/06/01
Re: minor mode for highlighting character classes such as non-ascii (bug 47455), Juri Linkov, 2021/06/01