[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuita
From: |
Clément Pit-Claudel |
Subject: |
Re: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuitable for CC Mode |
Date: |
Tue, 9 Jul 2019 02:41:12 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 |
On 2019-07-08 16:59, Stefan Monnier wrote:
> You seem to want them to be highlighted as if the next line was not part
> of a string (i.e. assume that a " was missing on the previous line),
> whereas all other major modes highlight that second line under the
> assumption that what was missing was a final \ on the previous line (or
> whatever other syntax the corresponding language requires).
>
> Both are wrong sometimes and right at other times.
I imagine this is less of a problem for people who use modes that automatically
insert string delimiters (i.e. when you press ", a second matching quote
immediately appears, so you don't run into fontification issues).
I don't use these, but over time Emacs has taught me to always write two double
quotes at once, or else my entire buffer will at once turn a uniform brown
color. I find the effect pretty distracting, and I'd much prefer for Emacs (in
all programming modes, in fact) to assume that my unterminated strings end at
the end 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.
(Btw, I wish there was a similarly easy way to minimize the Flycheck version of
the problem, where often a small syntax mistake will turn the entire buffer
into sea of red squiggles)
Clément.
- Re: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuitable for CC Mode, (continued)
- Re: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuitable for CC Mode, Alan Mackenzie, 2019/07/08
- Re: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuitable for CC Mode, João Távora, 2019/07/08
- Re: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuitable for CC Mode, Stefan Monnier, 2019/07/08
- Re: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuitable for CC Mode, Stefan Monnier, 2019/07/08
- Re: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuitable for CC Mode, Alan Mackenzie, 2019/07/08
- Re: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuitable for CC Mode, Stefan Monnier, 2019/07/08
- Re: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuitable for CC Mode, Alan Mackenzie, 2019/07/08
- Re: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuitable for CC Mode, Stefan Monnier, 2019/07/08
- Re: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuitable for CC Mode, Alan Mackenzie, 2019/07/08
- Re: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuitable for CC Mode, Stefan Monnier, 2019/07/08
- Re: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuitable for CC Mode,
Clément Pit-Claudel <=
- Re: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuitable for CC Mode, João Távora, 2019/07/09
- Re: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuitable for CC Mode, João Távora, 2019/07/09
- Re: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuitable for CC Mode, Alan Mackenzie, 2019/07/09
- Re: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuitable for CC Mode, João Távora, 2019/07/09
- Re: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuitable for CC Mode, João Távora, 2019/07/09
- Re: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuitable for CC Mode, Dmitry Gutov, 2019/07/09
- contextual refontification (was: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuitable for CC Mode), Stefan Monnier, 2019/07/09
- Re: contextual refontification (was: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuitable for CC Mode), João Távora, 2019/07/10
- Re: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuitable for CC Mode, João Távora, 2019/07/09
- Re: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuitable for CC Mode, Alan Mackenzie, 2019/07/09