emacs-devel
[Top][All Lists]
Advanced

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

Re: font-lock-syntactic-keywords obsolet?


From: Alan Mackenzie
Subject: Re: font-lock-syntactic-keywords obsolet?
Date: Mon, 27 Jun 2016 11:48:50 +0000
User-agent: Mutt/1.5.24 (2015-08-30)

Hello, Dmitry.

On Thu, Jun 23, 2016 at 04:30:21PM +0000, Alan Mackenzie wrote:
> On Wed, Jun 22, 2016 at 02:50:58AM +0300, Dmitry Gutov wrote:
> > On 06/21/2016 05:40 PM, Alan Mackenzie wrote:

> > > Yes, no, and N/A, respectively.  Try out this raw string support,
> > > sometime.

> > Here's some results: a performance degradation example, and a way to 
> > break CC Mode, apparently.

> Thanks for doing this test and telling me about it.

> > First, paste this near the top of xdisp.c (I did it after the big 
> > comment and before the header includes, but this is probably not too 
> > important):

> > const char* s1 = R"foo(
> > Hello
> > World
> > )foo";

> > and switch to c++-mode.

> > 1) Delete the last double-quote, then type it again. Deletion is 
> > noticeably slow (even though bearably so: feels like 0.5 sec), restoring 
> > it is faster.

[ .... ]

> Thanks.  I've just committed a patch which should fix your exact
> scenario.  As I said, there's a little more to do.

What was going wrong was typing characters into a C++ raw string when
there was no closing delimiter at all was very sluggish.  This was
because a lot of scanning to the "end of the literal" (i.e. here the end
of the buffer) was being done needlessly.

I've sorted this out, and typing into a raw string now doesn't cause a
delay.

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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