Your code makes a symbol, via MAKE-SYMBOL
, but you don't put it into a package.
Use the function INTERN
to add a symbol to a package.
To expand on Lars' answer, choose the right package. In this case the default might be to use the same package from the aliased function:
About style:
Anything that begins with DEF
should actually be a macro. If you have a function, don't use a name beginning with "DEF". If you look at the Common Lisp language, all those are macro. For example: With those defining forms, one would typically expect that they have a side-effect during compilation of files: the compiler gets informed about them. A function can't.
If I put something like this in a file
(define-predicate-alias zerop)
(zero? '())
and then compile the file, I would expect to not see any warnings about an undefined ZERO?
. Thus a macro needs to expand (define-predicate-alias 'zerop)
into something which makes the new ZERO?
known into the compile-time environment.
I would also make the new name the first argument.
Thus use something like MAKE-PREDICATE-ALIAS
instead of DEFINE-PREDICATE-ALIAS
, for the function.