[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuita
From: |
Stefan Monnier |
Subject: |
Re: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuitable for CC Mode |
Date: |
Mon, 08 Jul 2019 16:59:31 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
>> > Don't knock it - it's working, and will give João what he wants whilst
>> > preserving correct fontification.
>> Several people have already pointed out that what you call here "correct
>> fontification" is "incorrect" in the cases where the error is a missing
>> \ rather than a missing ".
> "Several people" is just one that I have seen, and he is wrong.
João gave you actual examples where fontifying the second line as
a code rather than string was an error. So we're at least 2.
> Whether
> the error "is" a missing \ or a missing " (for whatever value of "is"),
> the purpose of the fontification is to draw attention to this error.
> This error is at the EOL where there is a missing " or \. In that sense
> CC Mode's fontification of it is correct.
Maybe we're not talking about the same thing: The addition of some kind
of error/warning face on this line is indeed always correct and is
something that can easily be done without any need to fiddle with
syntax-table text properties. I'm definitely not arguing against this
highlighting of the immediate error.
But I'm talking about is the highlighting of the subsequent line(s).
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.
> How can you expect me to be other than adversarial when faced with such
> an attitude?
I guess I like to expect the unexpected ;-)
Stefan
- 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, João Távora, 2019/07/04
- 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 <=
- Re: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuitable for CC Mode, Clément Pit-Claudel, 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, 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