Subject: Re: bug#36423: 27.0.50; electric-pair-mode not working properly depending of file content.

From: Alan Mackenzie <[email-masked]>
Date: Mon, 8 Jul 2019 10:29:22 +0000

Hello again, Ergus.

On Mon, Jul 08, 2019 at 09:48:01 +0000, Alan Mackenzie wrote:
> On Wed, Jul 03, 2019 at 21:32:00 +0200, Ergus wrote:
> > Hi Alan:

> > Sorry for the bother again. After the fix you did, the "" issue is
> > better, but now there are new issues with the {} when I use pragmas for
> > example.

> OK, thanks!  I've corrected a further problem with " in
> electric-pair-mode, and I'm taking the liberty of closing your bug.  ;-)

> > I attached you a picture (because this is the easier way to explain it)

> This is actually a different bug.  If you haven't done so already, could
> you please raise this as a bug in its own right.  Thanks.

Actually, there's no need for this, I understand what's happening now
and it's "not a bug" - sort of.

In the lines:

1.    printf ("Hello
2.             world");

, there is an invalid string on L1, extending from " to the end of the
line.  There is also an invalid string on L2, starting at the ", which
encloses the ).  Thus this ), being inside a string, can't match the (
on L1.

Sorry I hadn't realised this half an hour ago.

Due to insistent complaints, I'm looking at modifying this "invalid
string" mechanism so that although it would fontify as it does now, it
would allow things like these two parentheses to match up.

[ .... ]

-- 
Alan Mackenzie (Nuremberg, Germany).