From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Autoloading (was: bug#5752: 23.1.94; sgml-lexical-context in post-command-hook) Date: Tue, 23 Mar 2010 10:29:25 -0400 Message-ID: References: <20100322113620.2500673506.qww314159@motoko.argon.local> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1269354600 19327 80.91.229.12 (23 Mar 2010 14:30:00 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 23 Mar 2010 14:30:00 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 23 15:29:56 2010 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.69) (envelope-from ) id 1Nu57E-0000Ci-5E for ged-emacs-devel@m.gmane.org; Tue, 23 Mar 2010 15:29:56 +0100 Original-Received: from localhost ([127.0.0.1]:49387 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nu57D-0007op-G0 for ged-emacs-devel@m.gmane.org; Tue, 23 Mar 2010 10:29:55 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nu578-0007oU-59 for emacs-devel@gnu.org; Tue, 23 Mar 2010 10:29:50 -0400 Original-Received: from [140.186.70.92] (port=46399 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nu573-0007o5-I7 for emacs-devel@gnu.org; Tue, 23 Mar 2010 10:29:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nu56z-0002XM-1u for emacs-devel@gnu.org; Tue, 23 Mar 2010 10:29:45 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:55849) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nu56s-0002Vk-KU; Tue, 23 Mar 2010 10:29:34 -0400 Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id o2NETQ8b007956; Tue, 23 Mar 2010 10:29:27 -0400 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 93E2F3A085; Tue, 23 Mar 2010 10:29:25 -0400 (EDT) In-Reply-To: (Glenn Morris's message of "Mon, 22 Mar 2010 22:37:33 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.93 (gnu/linux) X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3496=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:122549 Archived-At: > Fixed in emacs-23 branch by autoloading sgml-lexical-context in > flyspell.el. BTW, such manual autoloads are slightly problematic since they fail to provide docstrings (and arglists). I'm not sure how best to resolve such issues, but one solution I've been considering (for quite a while yet, but have never found time to dig into it) is to introduce a new form (require-autoload ) which would behave as follows: - when interpreting, it's just a require (we can't do much better). - when compiling, it causes the package to be loaded at compile time but in the .elc it's replaced by a bunch of autoloads (computed by the byte-compiler based on the intersection of the set of functions defined by and the set of functions called from the .elc file). -- Stefan