Well behaved post_eval_functions list (finally)



--- Wolfgang Jenkner  wrote:
> 
> I'd suggest to have only a generic hook in src and to load actual
> implementations from share.

Um - I suppose this could work, but what advantages do you see?

[snip]

> You have to explicitly call `post_eval_install()' at the beginning,

Why would you want to need to do that? Is there a reason not to have
this installed by default?  (I suppose I could be missing one, but one
of my original goals was that this ability be part of the standard
default Maxima image.)

> and instead of `kill(post_eval_functions)' do
> `post_eval_functions:[]'
> (assigning a list of symbols to `post_eval_functions' is allowed and
> expected, so IMHO there's not much point in using `kill', and
> infolists might be a bit of a red herring here).  Other than that,
> things should work the same way as in your examples.

But as a user I would expect kill(post_eval_functions) to work,
regardless.  kill is the "standard" reset mechanism.  Conceivably a
user might know nothing about how post_eval_functions works, but would
know to kill it if they want to stop any such evaluations.  For that
matter, post_eval_functions:[] works with the original implimentation
too, IIRC.  I actually got held up by the kill issue because I tried it
as a user, and it didn't work, and as a user I insisted it should.  So
the developer in me grumbled and procrastinated and finally figured it
out :-).

Is it that you want to avoid changing the default behavior of Maxima? 
The original coding of this feature should have absolutely no impact on
the functioning of Maxima unless someone specifically alters
post_eval_functions, and I was hoping to establish post_eval_functions
as a standard, universal method of doing this sort of thing rather than
having a share package do it.  For that matter, I could have simply put
in :lisp ([code]); statements to redefine toplevel-macsyma-eval and
kill1 and add post_eval_functions into the beginning of the unit
package (I think), but I was hoping there might be a way to make this
ability available in Maxima in a more general fashion.    

CY

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com