From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Colin S. Miller" Newsgroups: gmane.emacs.help Subject: Re: Very basic questions. Date: Sat, 16 Sep 2006 13:43:01 +0100 Organization: SunSITE.dk - Supporting Open source Message-ID: <450bf16c$0$75039$14726298@news.sunsite.dk> References: <450bdfd3$0$75037$14726298@news.sunsite.dk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1158414047 19928 80.91.229.2 (16 Sep 2006 13:40:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 16 Sep 2006 13:40:47 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Sep 16 15:40:45 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GOaPK-0007Hg-5s for geh-help-gnu-emacs@m.gmane.org; Sat, 16 Sep 2006 15:40:34 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GOaPJ-0004l2-N3 for geh-help-gnu-emacs@m.gmane.org; Sat, 16 Sep 2006 09:40:33 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news.netcologne.de!newsfeed-fusi2.netcologne.de!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!news.banetele.no!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail User-Agent: Thunderbird 1.5.0.5 (X11/20060812) Original-Newsgroups: gnu.emacs.help In-Reply-To: Original-Lines: 44 Original-NNTP-Posting-Host: 62.56.73.25 Original-X-Trace: news.sunsite.dk DXC=m; e_WhYBgE02]0d4PBaYSB=nbEKnk; @Dm>CYcV?05MCO35^o<=?DnJl7^Pb6? Original-X-Complaints-To: staff@sunsite.dk Original-Xref: shelby.stanford.edu gnu.emacs.help:141790 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:37412 Archived-At: jronald wrote: > "Colin S. Miller" > ??????:450bdfd3$0$75037$14726298@news.sunsite.dk... >>> In runtime, how does "require" know where the feature list is? There is >>> only machine code then. >>> >> John, >> >> (require 'feature) >> searches the paths listed in 'load-path', >> this can be added to using (add-path). >> It looks for a file called "feature.el" or "feature.elc". >> >> > Do you mean that "provide" modifies the files, both .el and .elc? I just > can't imagine. John, (require 'feature) loads the package 'feature' into Emacs's memory, it doesn't modify the source, or pre-compiled package, it just reads them. (provide 'feature), which is at the end of 'feature.el', confirms that the package "feature" has been loaded; this makes a subsequent (require 'feature) a no-operation command. A feature is normally provided by a source file of the same name as the feature, but can be provided by a different file, by using (require 'feature "feature-mode") In this cause "feature-mode.el" or "feature-mode.elc" will be loaded, they should have a (provide 'feature) at the end. To compile a source package into its .elc, run (byte-compile-file) on it. This is done when Emacs is compiled from its sources, and unless you are writing your own packages, you shouldn't need to use it. HTH, Colin S. Miller