type: defined function (closure) location: extension source file: init.lsp Common LISP compatible: yes supported on: all machines
(fmakunbound <symbol> ) <symbol> - an expression evaluating to a symbol
The FMAKUNBOUND function makes a symbol's function definition unbound. The <symbol> must be a valid symbol, but it does not need to have a definition. The FMAKUNBOUND function returns the symbol as its result.
(defun myfn () (print "hi")) ; define MYFN (myfn) ; prints "hi" (fmakunbound 'myfn) ; returns MYFN (myfn) ; error: unbound function - MYFN
NOTE: FMAKUNBOUND is not misspelled - there is no 'e' in it.
NOTE: The FMAKUNBOUND works on functions (closures) in the same way that MAKUNBOUND works on variables. Be sure to use the correct one for what you are unbinding. These functions do not generate an error if you try to unbind the wrong type. This is because of the definition of these functions and the fact that the function and variable name spaces are separate. You can have both a function called FOO and a variable called FOO.
NOTE: The function FMAKUNBOUND is created in the INIT.LSP file. If it 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.