[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fontifying unterminated strings [was: CC Mode and electric-pair "pro
From: |
João Távora |
Subject: |
Re: Fontifying unterminated strings [was: CC Mode and electric-pair "problem".] |
Date: |
Tue, 26 Jun 2018 21:02:54 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Alan Mackenzie <address@hidden> writes:
>> But what about when you write
>> char *thedoc = "Here it is:
>> - First do this
>> - Then do that
>> And that's it!";
>> Both cases are valid transient states. Which one will occur more often
>> depends a lot on the particular kind of code you write and your
>> coding habits.
> I suggest the most common case by far will be writing
> char *foo = "foo....
> in the middle of an existing buffer.
You can't know that, really. It's not just the users of
electric-pair-mode, but users of other popular autopairing packages, or
those autopair manually. Or users who mostly edit existing code. One
could even speculate (just as tremulously) that more C code gets
maintained than written these days.
>> Emacs can't reliably distinguish the two cases, so whichever behavior it
>> chooses it will look "amateurish" in some cases.
> No, you've misunderstood my point. It is not the aesthetic "niceness",
> the lack of which is amateurish; it is fontifying as a string something
> which isn't a string (as defined by the compiler's error messages).
It is just as wrong as fontifying something as C statements that isn't a
C statement.
- Re: CC Mode and electric-pair "problem"., (continued)
- Re: CC Mode and electric-pair "problem"., Alan Mackenzie, 2018/06/18
- Re: CC Mode and electric-pair "problem"., João Távora, 2018/06/18
- Re: CC Mode and electric-pair "problem"., João Távora, 2018/06/18
- Re: CC Mode and electric-pair "problem"., Stefan Monnier, 2018/06/18
- Re: CC Mode and electric-pair "problem"., Clément Pit-Claudel, 2018/06/18
- Re: CC Mode and electric-pair "problem"., Stefan Monnier, 2018/06/19
- Re: CC Mode and electric-pair "problem"., Clément Pit-Claudel, 2018/06/20
- Fontifying unterminated strings [was: CC Mode and electric-pair "problem".], Alan Mackenzie, 2018/06/26
- Re: Fontifying unterminated strings [was: CC Mode and electric-pair "problem".],
João Távora <=
- Re: Fontifying unterminated strings [was: CC Mode and electric-pair "problem".], Stefan Monnier, 2018/06/28
- Re: Fontifying unterminated strings [was: CC Mode and electric-pair "problem".], Stefan Monnier, 2018/06/28
- Re: CC Mode and electric-pair "problem"., Stephen Leake, 2018/06/18
- Re: CC Mode and electric-pair "problem"., João Távora, 2018/06/18
- Re: CC Mode and electric-pair "problem"., Clément Pit-Claudel, 2018/06/18
- Re: CC Mode and electric-pair "problem"., João Távora, 2018/06/19
- Re: CC Mode and electric-pair "problem"., Alan Mackenzie, 2018/06/19
- Re: CC Mode and electric-pair "problem"., Stefan Monnier, 2018/06/20
- Re: CC Mode and electric-pair "problem"., Alan Mackenzie, 2018/06/26
- Re: CC Mode and electric-pair "problem"., João Távora, 2018/06/27