By default, functions defined in a separate-namespace VLX are not exposed to the document or other application namespaces.
You must use the vl-doc-export function to expose functions to the document and other application namespaces. When issued from a VLX file that runs in its own namespace, vl-doc-export exposes the specified function to any namespace that loads the VLX file. The vl-doc-export function accepts a single argument, a symbol identifying the function name.
For example, look at the following code:
(vl-doc-export 'kertrats) (defun kertrats () (princ "This function goes nowhere") )
This example defines a function named kertrats, which simply prints a message. The defun for the function is preceded by a vl-doc-export call that causes the function to be exported.
You can use the vl-list-loaded-vlx function to return a list of all separate-namespace applications associated with the current document, and use the vl-list-exported-functions function to determine what functions have been exported from a separate-namespace application into the current document.
The following shows which separate-namespace applications are associated with the current document:
(vl-list-loaded-vlx) (DOCTEST)
The following command returns a list of the functions exported by the doctest application:
(vl-list-exported-functions "doctest") ("KERTRATS")
Functions defined in one separate-namespace VLX are not exposed to any other separate-namespace VLX applications. If a function has been exported through vl-doc-export, you can use the vl-doc-import function to make the function available to another separate-namespace VLX.