home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / windows / winlisp.zip / LISPLIB.LZH / AUTOLOAD.WL < prev    next >
Text File  |  1989-09-22  |  882b  |  26 lines

  1. ;============================================================================
  2. ; WinLisp:
  3. ;
  4. ;               A U T O L O A D I N G    F U N C T I O N S
  5. ;
  6. ; Copyright (c) Stephan POPOVITCH 1988-1989
  7. ; Author: Stephan POPOVITCH
  8. ;============================================================================
  9.  
  10. (setq #:winlisp:colon 'autoload)
  11.  
  12. (df autoload (file . fnlist)
  13.     (mapc (lambda (fn)
  14.                   (setfn fn 'fexpr
  15.                          `(:lvar (:loadfn ',fn :lvar ',file))))
  16.           fnlist))
  17.     
  18. (de :loadfn (:fn :lvar :file)
  19.     (let ((:old (valfn :fn)))
  20.          (cond ((and (tag syserror (funcall 'loadfile :file))
  21.                      (neq :old (valfn :fn)))
  22.                 (apply :fn :lvar))
  23.                (t (autoload :file :fn)             ;reset autoload feature
  24.                   (error 'autoload "undefined function" :fn))))))
  25.  
  26.