From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Fwd: Bug in lisp indentation Date: Tue, 17 Jul 2007 10:27:26 +0200 Message-ID: <864pk3305t.fsf@lola.quinscape.zz> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1184660860 3878 80.91.229.12 (17 Jul 2007 08:27:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 17 Jul 2007 08:27:40 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 17 10:27:39 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IAiP9-0001Ja-4y for ged-emacs-devel@m.gmane.org; Tue, 17 Jul 2007 10:27:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IAiP8-0007ul-LZ for ged-emacs-devel@m.gmane.org; Tue, 17 Jul 2007 04:27:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IAiP4-0007u1-Nb for emacs-devel@gnu.org; Tue, 17 Jul 2007 04:27:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IAiP2-0007ta-M8 for emacs-devel@gnu.org; Tue, 17 Jul 2007 04:27:29 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IAiP2-0007tT-HF for emacs-devel@gnu.org; Tue, 17 Jul 2007 04:27:28 -0400 Original-Received: from pc3.berlin.powerweb.de ([62.67.228.11]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IAiP1-0004pg-PO for emacs-devel@gnu.org; Tue, 17 Jul 2007 04:27:28 -0400 Original-Received: from quinscape.de (dslnet.212-29-44.ip210.dokom.de [212.29.44.210] (may be forged)) by pc3.berlin.powerweb.de (8.9.3p3/8.9.3) with ESMTP id KAA27205 for ; Tue, 17 Jul 2007 10:27:25 +0200 X-Delivered-To: Original-Received: (qmail 5014 invoked from network); 17 Jul 2007 08:27:26 -0000 Original-Received: from unknown (HELO lola.quinscape.zz) ([10.0.3.43]) (envelope-sender ) by ns.quinscape.de (qmail-ldap-1.03) with SMTP for ; 17 Jul 2007 08:27:26 -0000 Original-Received: by lola.quinscape.zz (Postfix, from userid 1001) id AD9B58FA33; Tue, 17 Jul 2007 10:27:26 +0200 (CEST) In-Reply-To: (Richard Stallman's message of "Mon\, 16 Jul 2007 23\:34\:23 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.51 (gnu/linux) X-detected-kernel: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:74963 Archived-At: Richard Stallman 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