3 ;; These are the helper functions for autoloading.
4 ;; The actual autoloading data is in src/max_ext.lisp
7 (defun aload (file &aux
*load-verbose
* tem
)
8 (let ((*read-base
* 10.
)
9 ($system
(list '(mlist)
10 #+kcl
(concatenate 'string si
::*system-directory
*
11 "../src/foo.{o,lsp,lisp}"))))
12 (declare (special $system
))
13 (setq tem
($file_search1 file
'((mlist)
16 (and tem
#-sbcl
(load tem
) #+sbcl
(with-compilation-unit nil
(load tem
)))))
18 (defmfun $aload_mac
(file &aux
*load-verbose
* tem
)
19 (let (($system
(list '(mlist)
20 #+kcl
(concatenate 'string si
::*system-directory
*
21 "../{src,share,share1,sharem}/foo.{mc,mac}"))))
22 (declare (special $system
))
23 (setq tem
($file_search1 file
'((mlist)
26 (and tem
($load tem
))))
30 (defun autof (fun file
)
32 (setf (symbol-function fun
)
38 (defun autom (fun file
)
40 (setf (macro-function fun
)
43 (funcall (macro-function fun
)
46 (defun auto-mspec (fun file
)
47 (unless (get fun
'mfexpr
*)
48 (setf (get fun
'mfexpr
*)
51 (funcall (get fun
'mfexpr
*) l
)))))
54 (defun auto-mexpr (fun file
)
55 (unless (mget fun
'mexpr
)
57 `((lambda) ((mlist) ((mlist) |_l|
))
58 ((mprogn) ((aload) ((mquote) ,file
)) (($apply
) ((mquote) ,fun
) |_l|
)))
62 (defmfun $auto_mexpr
(fun file
)
63 (unless (mget fun
'mexpr
)
65 `((lambda) ((mlist) ((mlist) |_l|
))
66 ((mprogn) (($aload_mac
) ((mquote) ,file
)) (($apply
) ((mquote) ,fun
) |_l|
)))