GNU bug report logs - #16526
24.3.50; scroll-conservatively & c-mode regression

Previous Next

Packages: cc-mode, emacs;

Reported by: martin rudalics <rudalics <at> gmx.at>

Date: Thu, 23 Jan 2014 08:54:02 UTC

Severity: important

Found in version 24.3.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #177 received at 16526-done <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Alan Mackenzie <acm <at> muc.de>, 
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 16526-done <at> debbugs.gnu.org
Subject: Re: bug#16526: 24.3.50; scroll-conservatively & c-mode regression
Date: Sat, 28 Jun 2014 16:00:40 +0200
> AH!!!!!  GOT IT!!!!  What causes the slowdown is binding
> open-paren-in-column-0-is-defun-start to nil around the scan-lists.  In
> CC Mode's "engine" parts, that variable is bound to nil.  There are good
> reasons for this (which I can't precisely recall just at the moment).
>
> In CC Mode, "'" has string syntax.  So any C comment with an odd number
> of apostrophes looks, to back_comment, like it has an "unbalanced string",
> and the code ends up at label lossage: in back_comment.  Here
> find_defun_start is called, and this returns BOB when open-paren-..-0 is
> nil.  From here (BOB) the code scans forward to check this putative
> "unbalanced string".  It's a long way from BOB to ~900k, hence the
> sluggishness.
>
> Where do we go from here?

In every version of Emacs I'm actually doing some work I have disabled
CC mode's `open-paren-in-column-0-is-defun-start' bindings.  Otherwise,
working on a file like xdisp.c would be virtually impossible for me.  As
for the release I would simply do what I proposed earlier - make these
overriding bindings customizable.  So someone who wants to comment out
code with a paren in the first column can have the "correct" behavior
while people like me can continue work with "incorrect" but yet tame
behavior.  And obviously I could continue to work without having bzr
status tell me that I've changed CC mode files ;-)

martin




This bug report was last modified 11 years and 16 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.