emacs-devel
[Top][All Lists]
Advanced

[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



reply via email to

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