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 #240 received at 16526-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Alan Mackenzie <acm <at> muc.de>
Cc: martin rudalics <rudalics <at> gmx.at>, 16526-done <at> debbugs.gnu.org
Subject: Re: bug#16526: 24.3.50; scroll-conservatively & c-mode regression
Date: Wed, 02 Jul 2014 21:57:23 -0400
> No.  The particular rogue invocation of scan-lists which caused this
> (sub-)thread scans from BOB to near EOB 29 times.  Inside scan-lists,
> _NO_ changes to syntax-tables, s-t text properties etc. are possible.
> What I'm suggesting is that cacheing that first scan from BOB will be a
> big win for many time-consuming scan-listses.

Here's the situation: we can add some special code to handle your case.
But adding code which will use syntax-ppss would be more beneficial for
99% of the major modes.

Adding a cache that only works within a single scan-lists instance is
too much trouble for too little gain.  Adding a cache that is flushed
less often means either it will suffer from the same limitations as
syntax-ppss (so we may as well use syntax-ppss), or it needs to
additionally hook into the text-property and set-syntax-table code to be
flushed in those extra corner cases, and there again these extra checks
will be only useful for those rare modes like CC-mode and will be at
best harmless and in some cases detrimental to performance compared to
simply using syntax-ppss.

IOW, using syntax-ppss for find_defun_start is The Right Thing to do.
And CC-mode should then be fixed to take advantage of it.


        Stefan




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

Previous Next


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