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)
19 (let ((tem ($file_search1 file
'((mlist) $file_search_maxima
))))
21 (with-open-file (in-stream tem
)
22 (batchload-stream in-stream
:autoloading-p t
)))))
25 (defun autof (fun file
)
27 (setf (symbol-function fun
)
33 (defun autom (fun file
)
35 (setf (macro-function fun
)
38 (funcall (macro-function fun
)
41 (defun auto-mspec (fun file
)
42 (unless (get fun
'mfexpr
*)
43 (setf (get fun
'mfexpr
*)
46 (funcall (get fun
'mfexpr
*) l
)))))
49 (defun auto-mexpr (fun file
)
50 (unless (mget fun
'mexpr
)
52 `((lambda) ((mlist) ((mlist) |_l|
))
53 ((mprogn) ((aload) ((mquote) ,file
)) (($apply
) ((mquote) ,fun
) |_l|
)))
57 (defmfun $auto_mexpr
(fun file
)
58 (unless (mget fun
'mexpr
)
60 `((lambda) ((mlist) ((mlist) |_l|
))
61 ((mprogn) (($aload_mac
) ((mquote) ,file
)) (($apply
) ((mquote) ,fun
) |_l|
)))