Subject: Re: [PATCH] add-zle-hook-widget
From: Bart Schaefer <[email-masked]>
To: [email-masked]
Date: Wed, 22 Jun 2016 13:25:41 -0700
List-Id: Zsh Workers List <zsh-workers.zsh.org>

On Jun 21,  1:41am, Daniel Shahaf wrote:
} Subject: Re: [PATCH] add-zle-hook-widget
}
} > I'm not sure there's a way to make it safe for all three of autoload +X,
} > source, and kshautoload.
} 
} Wouldn't the following work?
} 
} $ cat f
} f() { echo I have been called with "$@" }
} if [[ "$zsh_eval_context" != *\ file && ! -o kshautoload ]]; then
}     f "$@"
} fi

I don't think this correctly handles the case where "autoload -k" is used
but kshautoload is not actually set when the function is first called.
There's also the reverse case, where kshautoload IS set but the function
was declared with "autoload -z", to be considered.