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: Sun, 17 Jun 2018 22:27:20 +0100

On Sun, Jun 17, 2018 at 9:13 PM, Alan Mackenzie <address@hidden> wrote:
Hello, Glenn.

On Sun, Jun 17, 2018 at 12:58:53 -0400, Glenn Morris wrote:
> Alan Mackenzie wrote:

> > However, the test suite (make check) threw up another discrepancy, in a
> > test called
> > electric-pair-whitespace-chomping-2-at-point-4-in-c++-mode-in-strings.

> Hello, is this still being worked on?
> The test continues to fail on RHEL 7 and hydra.nixos.org.

From my point of view, the bug is not being worked on this very day, but
has by no means been forgotten.  It has needed a period of mulling over.
I think João sees it the same way.

Yes, while mulling over things is generally good, I believe the problem
from Glenn's perspective is the nuisance of checking whether every
test failure is something to worry about or just the thing being
mulled over.

So I suggest taking a quick temporary action to make the test pass
and then think about how to do it properly.  This action could be
disabling the test temporarily but IME that invariably buries the
issue ad eternum. So it's better to do it in cc-mode.

Although it won't be difficult to fix, this bug is an awkward thing, and
will need decisions (smallish ones) to be taken.

My favoured method would be to alter electric-pair--skip-whitespace such
that a NL terminating a string (as contrasted with a NL terminating a
comment) would be allowed to be scanned over.

I'm OK with adding an customization point to
electric-pair--skip-whitespace that c-mode can customize.  But I also
wonder whether the benefit to end-users of handling NL-terminated
strings are worth it.  Perhaps there are indeed benefits, it's just that
I haven't seen them argued.  But more importantly perhaps there are
ways to reap these benefits in a way that doesn't require changes
to e-p-m, or even better, in a way that benefits all of Emacs,
not just c-mode.

So, in practice, is the advantage here that the user is visually
warned of an invalid NL-terminated string?

João



reply via email to

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