emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fwd: Bug in lisp indentation


From: David Kastrup
Subject: Re: Fwd: Bug in lisp indentation
Date: Tue, 17 Jul 2007 10:27:26 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.51 (gnu/linux)

Richard Stallman <address@hidden> writes:

> The main purpose of lisp-indent-region was to optimize reindenting
> of regions.  This optimization made a big difference, way back when.
> Maybe it isn't necessary any more, but I'd like someone to try it
> on a not very fast computer and see.

Parsing arbitrarily far backward for every line is always going to
make for quadratic behavior.

I think we should try to come up with a general scheme where parsing
data can get cached and interpolated easily, so that
lisp-indent-region would basically be

(let ((indent-cache (make-indent-cache)))
  (loop through region
    (indent-line)))

Similar things would be nice for font locking and other stuff: some
cache that shortcircuits some specifical search/scan requests.

-- 
David Kastrup




reply via email to

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