[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unicode confusables and reordering characters considered harmful, a

From: Stefan Kangas
Subject: Re: Unicode confusables and reordering characters considered harmful, a simple solution
Date: Thu, 4 Nov 2021 20:52:21 -0700

Daniel Brooks <db48x@db48x.net> writes:

> Rust also has a very flexible annotation system that allows the
> programmer to annotate specific statements and language items. If a use
> of these characters is determined to be legitimate, the programmer can
> annotate the comment, or the function the comment is in, so that this
> error is disabled. In projects with strong review culture, seeing that
> annotation while doing a code review will be a very strong signal that
> something unusual is going on, and that it needs to be considered
> carefully. Annotations are are a great feature of Rust that I do not
> expect Emacs to take into account.

We already have `ignore-errors', `with-suppressed-warnings', etc.
That sounds as powerful as the annotation system you describe, or am I
missing something?

[Discussing strictly what to do about Emacs Lisp here:]

In any case, the above leads me back to the simple idea to raise
byte-compiler (or even `read'?) warnings for the problematic control
characters unless a specific variable is set to t, or unless the piece
of code using them is wrapped in some `with-suppressed-warnings' call.

Or we do it the other way around: users mark a source code file to say
that "this file will never contain RTL characters" (but RTL scripts in
ELisp code is pretty uncommon, I think).

It doesn't seem too bad, certainly not much worse than having to add
"coding: utf-8" or similar.

Was such a solution rejected already?

> Instead I think that Emacs should adopt a similar fast
> strategy. Anything we do today can be refined later.

FWIW, I tend to agree with this.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]