Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Compsys and KSH_AUTOLOAD



Bart wrote:

> Matthias has since written back to me again and says he's having all sorts
> of problems with zcompile'd functions even after starting from scratch and

I've had problems with it in the past so it probably needs more
investigation.

> I don't specifically mean "does the above workaround deserve a FAQ entry"
> but rather "does using compsys with kshautoload deserve a FAQ entry",
> whatever the best A to the Q turns out to be.

It probably does deserve an FAQ entry. The minimum possible A to the Q
will be to use -z when using autoload for compinit. With that we either
need an FAQ or to suggest the -z everywhere we show the autoload -U
compinit.

> The autoload method used isn't stored anywhere in the function structure.
> Only the fact that the function is not yet defined is stored, and then zsh
> applies whatever autoload setting is in effect globally at the time that
> the function is loaded.

Presumably it also stores whether the function was autoloaded with the
-U option. Looks like there is a PM_UNALIASED flag. Maybe we can just
add PM_ZSHSTORED and PM_KSHSTORED flags.

> I suppose we could modify the storage and the code that does autoloading
> [as opposed to modifying only bin_autoload()]; I forget why I didn't do
> so at the time -- probably because it was a significantly larger change.

It just needs a bit of investigation then to see if there was a more
fundamental reason. I was wondering if there was some clash with
typeset options (autoload being a variant of it). Hopefully not.

Oliver



Messages sorted by: Reverse Date, Date, Thread, Author