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: João Távora
Subject: Re: CC Mode and electric-pair "problem".
Date: Tue, 19 Jun 2018 01:02:12 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (darwin)

Stephen Leake <address@hidden> writes:

> 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.

Well, I don't understand the specific relevance of your example, e-p-m
doesn't "support" that, Emacs does. But FWIW your expectation is exactly
what it does now (you insert one quote, get two, then you enter the
newline).  So that's not the problem, the problem in e-p-m is a
corner-case of whitespace "chomping", that shouldn't hopefully be very
hard to fix.

My objections are beyond electric-pair-mode.  I was telling Alan how
this breaks sexp-based navigation, for instance.

> 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.

Indeed, if you frequently do this, it's somewhat nicer not to paint the
rest of the buffer purple (or font-lock-string-face).  But now you know
about the drawbacks.

João



reply via email to

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