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

Previous Next

Packages: emacs, cc-mode;

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

From: Alan Mackenzie <acm <at> muc.de>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 16526-done <at> debbugs.gnu.org
Subject: Re: bug#16526: 24.3.50; scroll-conservatively & c-mode regression
Date: Sat, 28 Jun 2014 17:33:34 +0000
Hi, Stefan.

On Sat, Jun 28, 2014 at 10:34:58AM -0400, Stefan Monnier wrote:
> > Where do we go from here?

> Not sure.  Would `syntax-ppss' return correct values from the code in
> question?  If yes, then changing back_comment to call back to Elisp and
> use syntax-ppss in the lossage case should eliminate this
> algorithmic problem.

No, syntax-ppss wouldn't do here without considerable modification.
scan-lists must be utterly robust.  syntax-ppss can get confused if the
user changes the syntax-table, or adds systax-table text properties, or
binds before-change-functions to nil and makes a change.

How about simply (tm) find-defun-start actually determining a defun
start (when open-paren-..-defun is nil) the first time it is called for
an invocation of scan-lists, then remembering this position for
subsequent use?  This would work well for the particular scan-lists
invocation we've been talking about.

As an enhancement, which would work well for scan-lists at top level
with a large negative COUNT, we could keep a list of top level positions
during the initial scan, say every ~5k characters.  (Or even store the
actual parse states every 5k characters exactly.)

Or something like that.

>         Stefan

-- 
Alan Mackenzie (Nuremberg, Germany).




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.