From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.lisp.guile.devel Subject: doc autoload Date: Sun, 02 Jan 2005 10:19:54 +1100 Message-ID: <87u0q0ybxh.fsf@zip.com.au> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1104622299 30885 80.91.229.6 (1 Jan 2005 23:31:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 1 Jan 2005 23:31:39 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Jan 02 00:31:33 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Cksib-0000AG-00 for ; Sun, 02 Jan 2005 00:31:33 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Ckstg-00060o-1K for guile-devel@m.gmane.org; Sat, 01 Jan 2005 18:43:00 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CkstX-0005yW-U9 for guile-devel@gnu.org; Sat, 01 Jan 2005 18:42:51 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CkstV-0005xb-TH for guile-devel@gnu.org; Sat, 01 Jan 2005 18:42:50 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CkstV-0005wA-Jt for guile-devel@gnu.org; Sat, 01 Jan 2005 18:42:49 -0500 Original-Received: from [61.8.0.84] (helo=mailout1.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Cksfl-0002RO-13 for guile-devel@gnu.org; Sat, 01 Jan 2005 18:28:37 -0500 Original-Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.0.86]) by mailout1.pacific.net.au (8.12.3/8.12.3/Debian-7.1) with ESMTP id j01NSYA6004385 for ; Sun, 2 Jan 2005 10:28:34 +1100 Original-Received: from localhost (ppp2CAB.dyn.pacific.net.au [61.8.44.171]) by mailproxy1.pacific.net.au (8.12.3/8.12.3/Debian-7.1) with ESMTP id j01NSLAr001864 for ; Sun, 2 Jan 2005 10:28:32 +1100 Original-Received: from gg by localhost with local (Exim 3.36 #1 (Debian)) id 1CksXU-0005UG-00; Sun, 02 Jan 2005 10:20:04 +1100 Original-To: guile-devel@gnu.org Mail-Copies-To: never User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:4612 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:4612 Correction to define-modules #:autoload, it read like the arg was a single symbol, but it's actually a list. `#:autoload MODULE SYMBOL-LIST' Load MODULE when any of SYMBOL-LIST are accessed. For example, (define-module (my mod) #:autoload (srfi srfi-1) (partition delete-duplicates)) ... (if something (set! foo (delete-duplicates ...))) When a module is autoloaded, all it's bindings become available. SYMBOL-LIST is just those that will first trigger the load. An autoload is a good way to defer loading a big module until it's really needed, for instance for faster startup or if it will only be needed in certain circumstances. `@' can do a similar thing (*note Using Guile Modules::), but in that case an `@' form must be written every time a binding from the module is used. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel