From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.devel Subject: Re: package.el Date: Mon, 21 May 2007 17:44:10 -0600 Message-ID: References: <2cd46e7f0705101124r72000f78xdf05d18ca815ca57@mail.gmail.com> <17991.47259.210100.801472@localhost.localdomain> <85d50wq6a9.fsf@lola.goethe.zz> <1122B7CB-0AA2-475F-847B-A5D0B2FA2B05@gmail.com> Reply-To: tromey@redhat.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1179792241 1035 80.91.229.12 (22 May 2007 00:04:01 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 22 May 2007 00:04:01 +0000 (UTC) Cc: emacs-devel@gnu.org To: David Reitter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 22 02:03:59 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 1HqHr4-00017J-BG for ged-emacs-devel@m.gmane.org; Tue, 22 May 2007 02:03:58 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HqHr3-0007k5-W0 for ged-emacs-devel@m.gmane.org; Mon, 21 May 2007 20:03:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HqHr0-0007jd-IR for emacs-devel@gnu.org; Mon, 21 May 2007 20:03:54 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HqHqz-0007jJ-TQ for emacs-devel@gnu.org; Mon, 21 May 2007 20:03:54 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HqHqz-0007jG-Mr for emacs-devel@gnu.org; Mon, 21 May 2007 20:03:53 -0400 Original-Received: from mx1.redhat.com ([66.187.233.31]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HqHqz-000151-7C for emacs-devel@gnu.org; Mon, 21 May 2007 20:03:53 -0400 Original-Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l4M03pkm012145; Mon, 21 May 2007 20:03:51 -0400 Original-Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l4M03peh007284; Mon, 21 May 2007 20:03:51 -0400 Original-Received: from opsy.redhat.com (ton.toronto.redhat.com [172.16.14.15]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l4M03oEW012097; Mon, 21 May 2007 20:03:50 -0400 Original-Received: by opsy.redhat.com (Postfix, from userid 500) id 70B8D88826B; Mon, 21 May 2007 17:44:11 -0600 (MDT) X-Attribution: Tom In-Reply-To: <1122B7CB-0AA2-475F-847B-A5D0B2FA2B05@gmail.com> (David Reitter's message of "Tue\, 22 May 2007 00\:50\:14 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.95 (gnu/linux) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) 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:71558 Archived-At: >>>>> "David" == David Reitter writes: >> Currently this is done by loading the "-pkg.el" file from the package, >> which then invokes define-package. David> ..but that would mean that each package has to have an extra file. David> Many packages consist of only a single .el source file, which then David> doesn't even need to be tar'ed for distribution. Yes. Please look at package.el. This is what it does; for single files it generates the -pkg.el and -autoloads.el files. For multi-file packages, my belief is that adding a single file containing a single form is not a major maintenance burden. >> I don't see how feature-version would be defined until a package is >> loaded -- but that is what we want to avoid. David> How about looking for some tags ;; pkg:define and ;; pkg:end inside David> the source file, and then evaluating only what's within those tags? package.el uses the comments to generate the -pkg.el file. I'm reasonably sure that I don't want to do this scanning every time Emacs starts up. But I admit I have not benchmarked the scanning approach. Tom