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 (declare (special $system
))
11 (setq tem
($file_search1 file
'((mlist) $file_search_lisp $system
)))
12 (and tem
#-sbcl
(load tem
) #+sbcl
(with-compilation-unit nil
(load tem
)))))
14 (defmfun $aload_mac
(file)
15 (let ((tem ($file_search1 file
'((mlist) $file_search_maxima
))))
17 (with-open-file (in-stream tem
)
18 (batchload-stream in-stream
:autoloading-p t
)))))
21 (defun autof (fun file
)
23 (setf (symbol-function fun
)
29 (defun autom (fun file
)
31 (setf (macro-function fun
)
34 (funcall (macro-function fun
)
37 (defun auto-mspec (fun file
)
38 (unless (get fun
'mfexpr
*)
39 (setf (get fun
'mfexpr
*)
42 (funcall (get fun
'mfexpr
*) l
)))))
45 (defun auto-mexpr (fun file
)
46 (unless (mget fun
'mexpr
)
48 `((lambda) ((mlist) ((mlist) |_l|
))
49 ((mprogn) ((aload) ((mquote) ,file
)) (($apply
) ((mquote) ,fun
) |_l|
)))
53 (defmfun $auto_mexpr
(fun file
)
54 (unless (mget fun
'mexpr
)
56 `((lambda) ((mlist) ((mlist) |_l|
))
57 ((mprogn) (($aload_mac
) ((mquote) ,file
)) (($apply
) ((mquote) ,fun
) |_l|
)))