[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

doc autoload

From: Kevin Ryde
Subject: doc autoload
Date: Sun, 02 Jan 2005 10:19:54 +1100
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux)

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

               (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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]