[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Settor functions and initialization



Ouch.  After redesigning part of my es init files, I find that I often
cannot run es in subprocesses anymore.  What happens is this:

I have a settor function that calls another function I have defined.  The
principle is this:

set-FOO = @ *{%fun foo $*}
fn %fun ... {...}

Now, when a new es starts up, things break if variables are initialized
from the environment in this order:

  set-FOO
  FOO
  fn-%fun

for when FOO is set, set-FOO is called and it tries to run %fun which is
not defined.  This kills the shell.

I believe that during initialization, all variables should be initialized
from the environment without trying to call settor functions.  Only
afterwards should settors be looked for and called, for each variable that
was initialized from the environment in the first place.

- Harald