[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CC Mode and electric-pair "problem".
From: |
Stephen Leake |
Subject: |
Re: CC Mode and electric-pair "problem". |
Date: |
Mon, 18 Jun 2018 17:41:24 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (windows-nt) |
João Távora <address@hidden> writes:
> Alan Mackenzie <address@hidden> writes:
>
>>> > OK, here goes. Why should major modes tie themselves in knots, just so
>>> > that electric-pair-mode can work? What CC Mode is doing is natural, and
>>> > matches the reality.
>>
>>> I think you mean "mode", in the singular form :-).
>>
>> No. CC Mode comprises lots of modes, not all of them maintained by me.
>> But even aside from that, CC Mode has often been a pioneer, developing
>> new techniques, which the rest of Emacs has then followed. Examples are
>> hungry deletion and electric indentation.
>
> But they are all children of cc-mode.el right? I meant singular as in,
> afaik, nobody else independently thought of doing that besides you.
For what it's worth, I'm planning on adding "new line terminates string"
to ada-mode. As Alan says, that is the way the compiler works. I was
initially inspired independently, while working on an error-correcting
parser, and found it in cc-mode while looking for ways to implement it.
If electric-pair mode wants to support users splitting a string across
lines, it should insert " before and after the newline; that's what I
would expect from it.
For me, it's more common to forget the closing " (possibly due to
copy/paste), in which case terminating the string at the new line is
more friendly.
--
-- Stephe
- Re: CC Mode and electric-pair "problem"., (continued)
- 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, 2018/06/26
- 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 <=
- 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
- Re: CC Mode and electric-pair "problem"., Stefan Monnier, 2018/06/28
- Re: CC Mode and electric-pair "problem"., Alan Mackenzie, 2018/06/30
- Re: CC Mode and electric-pair "problem"., Stefan Monnier, 2018/06/30