public static boolean checkLispSymbol(String name, boolean fboundp)
Checks whether a Lisp symbol exists, and optionally whether it is fbound.
name specifies the name of the Lisp symbol. The string name is parsed in a simple way, rather than using the Lisp reader. The parsing involves:
Upcase the string.
If there is a colon, take the part before it as a package name. Otherwise use "COMMON-LISP-USER" as the package name.
If the colon is followed by another colon, skip it and set a flag allowing internals. Otherwise, set a flag allowing only externals.
Take the rest of the string as the symbol name.
Find the package from the package name.
Find the symbol using the package and the symbol name. If it is internal, use it only if the flag allowing internal was set.
If fboundp is
true, check whether the symbol is fbound.
If all these steps succeed,
true. Otherwise it returns
For symbols with names that do not need escaping, the result is the same normal processing by the Lisp reader without interning when there is no symbol.
checkLispSymbol caches the results in the Java side, which means that if the symbol appears or gets defined after the first call to
checkLispSymbol it may return the wrong result.
LispWorks User Guide and Reference Manual - 20 Sep 2017