Skip to content

melisgl/autoload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Autoload Manual

Table of Contents

[in package AUTOLOAD]

1 Links and Systems

Here is the official repository and the HTML documentation for the latest version.

  • [system] "autoload-doc"

    • Description: Parts of autoload that depend on mgl-pax. This is split off autoload because mgl-pax-bootstrap depends on autoload. Note that mgl-pax/navigate and mgl-pax/document depend on this system, which renders most of this an implementation detail.
    • Depends on: autoload, mgl-pax

2 API

  • [macro] AUTOLOAD NAME ASDF-SYSTEM-NAME

    Unless NAME already has an FDEFINITION, define a stub function with NAME to autoload ASDF-SYSTEM-NAME. When called, this stub will do the following:

    1. Set the FDEFINITION of NAME to a function that signals an error.

    2. Call ASDF:LOAD-SYSTEM on ASDF-SYSTEM-NAME.

    3. Call NAME with the original arguments.

    Thus, the loaded system is expected to redefine the stub. If it doesn't, then an error will be signalled and all subsequent calls to the function will produce the same error without attempting to load the system again.

    The stub is not defined at compile time, which matches the required semantics of DEFUN.

  • [macro] DEFUN/AUTOLOADED NAME LAMBDA-LIST &BODY BODY

    Like DEFUN, but silence redefinition warnings.

  • [macro] DEFVAR/AUTOLOADED VAR &OPTIONAL (VAL NIL) (DOC NIL)

    Like DEFVAR, but works with the global binding on Lisps that support it (currently Allegro, CCL, ECL, SBCL). This is to handle the case when a system that uses DEFVAR with a default value is autoloaded while that variable is locally bound:

    ;; Some base system only foreshadows *X*.
    (declaim (special *x*))
    (let ((*x* 1))
      ;; Imagine that the system that defines *X* is autoload here.
      (defvar/autoloaded *x* 2)
      *x*)
    => 1

[generated by MGL-PAX]

About

Bare-bones autoloading facility for Common Lisp

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors