Open melton1968 opened 9 years ago
This is a consequence of quoting, and it will happen regardless of how many files are used.
As a general and hard rule, anything quoted with a regular quote '
or a backtick (as in your example) is not namespaced. That's because quotes lists can be absolutely anything. There's no way of knowing whether it's a function form or some arbitrary data list.
The way you've written cmacro is the correct way of doing this. When you're inside a quote, you just need to specify the full name.
Still, there is a workaround for your case. Inside a backtick, forms preceded by a comma ,
are namespaced. So you should be able to do the following:
`(,#'afunc)
But I still prefer the cmacro.
maybe this could make it in the doc? I want to start using namespacing on my packages :D I think names
will be a good experiment.
If a
namespace
is split across multiple files (or even re-opening thenamespace
in the same file), is there a way to cause function names embedded inside abackquote
to benamespace
-ed? As an example, is there a way to writebmacro
below other than fully specifying the functionafunc
?