type: defined macro (closure) location: extension source file: init.lsp Common LISP compatible: no supported on: all machines
(savefun <function> ) <function> - the name of the function or macro to be saved
The SAVEFUN macro saves the specified function or macro to a file. The file will be called <function>.lsp. The macro returns the file name that was created. An error will occur if the <function> parameter is not a function or macro.
(defun myfoo (fee fi) ; create a function (+ fee fi)) (savefun myfoo) ; saves MYFOO to "MYFOO.lsp" (savefun savefun) ; saves SAVEFUN to "SAVEFUN.lsp" (savefun 'a) ; error: bad argument type
NOTE: The SAVEFUN macro is defined in the INIT.LSP file. If SAVEFUN does not exist in your XLISP system, you might be having a problem with INIT.LSP. Before you start XLISP, look in the directory you are currently in, and check to see if there is an INIT.LSP. Another thing to try is to put a PRINT message in the INIT.LSP file and make sure that it is printed out when XLISP starts running.