[Top][All Lists]

[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: Mon, 16 Nov 2015 21:12:16 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

Hello, Martin.

On Mon, Nov 16, 2015 at 07:55:13PM +0100, martin rudalics wrote:
>  > I've just committed a fix (to the emacs-25 branch), mainly for C++ Mode,
>  > but also for C Mode, too.

> Looks good, almost back to normal.  What was the idea of the change?  I
> don't understand from looking at the diffs (or reading the ChangeLog).

There were two elements to the change.  One was preventing the slow
function (c-back-over-member-initializers) from being called from
anything but C++ Mode, since it is relevant only to C++.

But before that, I fixed that actual function.  It's problem was that it
was doing a lot of, in effect:

    (and (c-at-toplevel-p)

.  c-at-toplevel-p is a ruinously expensive function, and it was being
called continually.  So, in effect, I reversed the order of these two
things, so that only in the rare case where we have a member initializer
list, do we then check for being at the top level.

I think I was having a bad coding day when I originally wrote that

> Thanks a lot, martin

Alan Mackenzie (Nuremberg, Germany).

reply via email to

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