[Top][All Lists]

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

Re: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuita

From: João Távora
Subject: Re: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuitable for CC Mode
Date: Tue, 9 Jul 2019 10:06:14 +0100

On Tue, Jul 9, 2019 at 7:42 AM Clément Pit-Claudel <address@hidden> wrote:
> of the line.  That's not more "correct", of course, but it does minimize the amount
> of refontification and blinking in a pretty common case.

No, it doesn't. Suppose you had that hypothetical version of Emacs and
you did have a multi-line string, properly escaped with backslashes. Now you
removed the backslash. Brutal "wrong" refontification ensues just as now,
fontifying as code what up to now used to be fontified as a string.

Just as distracting, really.

Both situations are wrong, and neither is "more wrong" than the other.
But the version you propose is much harder to implement, likely less
efficient, and backward incompatible to how Emacs has worked over
many, many years. Depending on how it is implemented (certainly how Alan
implemented it) it breaks things in Emacs core and third-party code. It is also
useless in languages which do allow unescaped multi-line strings (which
I think are the norm nowadays, but I'm not sure).

Overall, clearly not a net win.


reply via email to

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