emacs-devel
[Top][All Lists]
Advanced

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

Re: CC Mode now respects users' settings of open-paren-in-column-0-is-de


From: Alan Mackenzie
Subject: Re: CC Mode now respects users' settings of open-paren-in-column-0-is-defun-start.
Date: Thu, 12 Nov 2015 18:09:39 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

Hello, Martin.

On Thu, Nov 12, 2015 at 09:22:19AM +0100, martin rudalics wrote:
>  > By popular request, CC Mode no longer binds
>  > open-paren-in-column-0-is-defun-start to nil internally.

> Thanks.

>  > As a consequence, CC Mode should run slightly faster,

> So far, the performance didn't improve significantly.  Either there are
> other changes that did make editing C deteriorate considerably over the
> past two years or I still have to tweak some internal settings.  I'll
> get back to you as soon as I know more.

I noticed a large degradation in speed, too.  I timed the complete
fontification of xdisp.c, and Emacs 24.5 was taking ~40s (with
o-p-i-c-0-i-defun-start t).  The same on Emacs 25.1 is taking ~77s.  The
difference seems to be between standalone CC Mode and the version
included with Emacs 25.1.  There's some bug on savannah CC Mode which
hasn't been fixed, or some optimisation which hasn't been made.

(Somewhat later).  The standalone CC Mode doesn't (in the default
branch) contain certain C++11 enhancements.  These seem to be what is
slowing things down.  This should be easily fixable for C Mode, but it
would be nice to fix it for C++ Mode, too.

>  > but at a slightly
>  > higher risk of mis-indenting and mis-fontifying.  Those bug bears, open
>  > parens in column 0 in strings and comments, will again cause things which
>  > look like errors.

> Funnily, a few minutes ago I read that for performance reasons an
> implementation of "parinfer-mode"
> (https://github.com/oakmac/atom-parinfer) relies on a similar feature.

> We still also should fix the font-lock issue you reported elsewhere.  I
> have no idea yet why it doesn't work any more.

You mean the open paren in column 0 not getting bold red?  I'm looking
at that at the moment, with thanks to Glenn for pointing out it used to
work very recently.

> martin

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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