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


View this message in rfc822 format

From: Alan Mackenzie <acm <at> muc.de>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, 16526-done <at> debbugs.gnu.org
Subject: bug#16526: 24.3.50; scroll-conservatively & c-mode regression
Date: Sun, 29 Jun 2014 12:48:29 +0000
Hi, Martin.

On Sun, Jun 29, 2014 at 12:06:46PM +0200, martin rudalics wrote:
>  > That's a bit philosophical.  open-..-start is advertised as a high level
>  > option, and CC Mode only binds it to nil at a low level, the "engine"
>  > level.  Binding user options to set values at a low level is quite a
>  > common practice in Elisp programming.

> It is a quite bad common practice in Elisp programming.

:-)  We're down at the philosophy level again.

>  > The actual bug here is that find_defun_start in syntax.c doesn't do any
>  > cacheing, hence is scanning from BOB far too often.  How about we see
>  > how things work once this is fixed.

> We're discussing this problem for some ten years now and I'm afraid we
> won't find a solution for the imminent release.

We've been discussing it for some while, yes, but a concrete diagnosis
of the problem first happened yesterday, as far as I'm aware.  Do you
feel like fixing it?  I think you know the C code better than I do, and
you're highly motivated.  Once fixed, Stefan might be inclined to
include the fix in 24.4.

As I suggested yesterday, what is needed is for find_defun_start to
actually determine the beginning-of-defun before POS/POS_BYTE (using
scan_sexps_forward) rather than just giving up and returning BOB.
This position must then be cached for future find_defun_start calls.
The cacheing mechanism is already in place for non-nil open-...-start.

The above simple cacheing might not be adequate in theory, but I'm
guessing that in practice it will be a substantial win.

> martin

-- 
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.