From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Refactoring of emacs-lisp/autoload.el Date: Thu, 14 Aug 2008 13:17:39 +0000 Message-ID: <20080814131739.GD2593@muc.de> References: <20080812162333.GA7999@muc.de> <20080813141133.GC3010@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1218719808 6343 80.91.229.12 (14 Aug 2008 13:16:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Aug 2008 13:16:48 +0000 (UTC) Cc: Glenn Morris , Chong Yidong , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 14 15:17:39 2008 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 1KTchl-00015m-0i for ged-emacs-devel@m.gmane.org; Thu, 14 Aug 2008 15:17:29 +0200 Original-Received: from localhost ([127.0.0.1]:47200 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KTcgo-0000t0-AX for ged-emacs-devel@m.gmane.org; Thu, 14 Aug 2008 09:16:30 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KTcfz-0000YN-LG for emacs-devel@gnu.org; Thu, 14 Aug 2008 09:15:39 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KTcfy-0000Y2-VW for emacs-devel@gnu.org; Thu, 14 Aug 2008 09:15:39 -0400 Original-Received: from [199.232.76.173] (port=53249 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KTcfy-0000Xs-O2 for emacs-devel@gnu.org; Thu, 14 Aug 2008 09:15:38 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:4266 helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KTcfy-0002F4-71 for emacs-devel@gnu.org; Thu, 14 Aug 2008 09:15:38 -0400 Original-Received: (qmail 18539 invoked by uid 3782); 14 Aug 2008 13:15:36 -0000 Original-Received: from acm.muc.de (pD9E522E5.dip.t-dialin.net [217.229.34.229]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Thu, 14 Aug 2008 15:15:26 +0200 Original-Received: (qmail 6538 invoked by uid 1000); 14 Aug 2008 13:17:39 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.6-4.9 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:102448 Archived-At: Hi, Stefan! On Wed, Aug 13, 2008 at 04:31:14PM -0400, Stefan Monnier wrote: > > OK. I haven't yet characterised fully the criterion for a file being > > in this list. I'm looking at that now. > Normally, all files should appear in loaddefs.el: either they have their > own section or they're in the "nothing to declare" section. > If there are a couple files not mentioned there, it's not tragic, tho. Ah, got it! It was just I thought I'd seen a file with its own section which was also in the "innocent" section at the end. I've had a look for this, and can't find it. So I must have been mistaken. > The goal is that running "cd emacs/lisp; make autoloads" after > loaddefs.el has just been updated should only need to scan loaddefs.el, > and check the timestamp of all the .el files, and can then return > without reading any of the other (unchanged) elisp files, so that "make > autoloads" is almost immediate when it has nothing to do. OK. This is obviously very important. The patch I posted here isn't up to scratch for that. I'll need to improve it. > > My strategy when inserting a new entry into loaddefs.el is to start > > searching from the current position in that file. So if the source > > files are processed in alphabetical order, the newer autoload.el > > should be just as fast (or, at least, fast enough). > Yes, that sounds fine. What I'll be doing is sorting the "no-autoloads" list so that it's in the same order as the file entries. I can then loop through all the files, testing in turn whether the file was a "no-autoload" or had its own section, and take the appropriate action. That will mean never having to search loaddefs.el for an entry, and not having to use `member' in the "no-autoloads" list, since I will be stepping through both from start to finish. > Stefan -- Alan Mackenzie (Nuremberg, Germany).