emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuita


From: João Távora
Subject: Re: [PATCH] Re: Algorithm in electric-pair--unbalanced-strings-p unsuitable for CC Mode
Date: Mon, 8 Jul 2019 13:10:45 +0100

On Mon, Jul 8, 2019 at 11:05 AM Alan Mackenzie <address@hidden> wrote:
 
> I have an idea how to make C-M-* work in these bogus multi-line strings,
> but it's going to take more than a couple of days to implement.  It
> involves only having the pertinent string fence syntax-table text
> properties present during fontification and CC Mode's
> before/after-change-functions.

No idea if that approach has any pitfalls, but if it doesn't, it's a good
bet that you won't need the electric-pair-inhibit-predicate tweak
you just committed. You'll probably also unbreak a
C++/electric-pair test, bringing back cc-mode closer to what is was
before the pursuit of these new fontification features.

Nevertheless I think you should heed Stefan's advice. It should give
you all of the above (invalid string indicator included), with much
less code and hassle, and you can use string fences some other time.

João

reply via email to

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