I should have said that modifying make-declares works when
the code is translated (or compiled).
make-declares is only called by tr-lambda. You could:
1) add paramter declare-specials-p to tr-lambda and make-declares
and all existing code calls them with flag set to true.
2) Make a copy of mprog (ie $block) called $module..
3) Make copy of (def%tr mprog ... call (def%tr $module
that calls tr-lambda with declare-specials-p
set to false. You could do the same with maxima lambda, call it
lambda_module or something.
3) I tried copying (defmspec $define ... to $define_trans and
changing the call to meval to call translate-and-eval-macsyma-expression.
This seemed to work, ie
(%i13) define_trans(h(x),x);
Translating: h h
Then define_trans(f(x),module([y:3], ...))
should define a function f with lexically scoped y.
I didn't put all the pieces together.
bw wrote:
> Maybe would be possible to modify the Maxima to CL
> translator to remove most of the special declarations, and
> to insert a few lines of code in the read-eval-print loop
> that translates all inputs. That might be a quick way to
> experiment with MaximaL? Likely, I don't know what I'm
> talking about.
-- John Lapeyre