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

Re: PATCH: expl not always local



On Thu, Jun 02, 2005 at 05:02:47PM +0000, Bart Schaefer wrote:
> On Jun 2,  6:44pm, Oliver Kiddle wrote:
> } Subject: Re: PATCH: expl not always local
> }
> } Bart wrote:
> } > Careful with these.  They may be expecting to be called in a context
> } > where the caller has declared expl as a local.
> } >
> } > In general, if a function file starts with #autload then it's a
> } > utility and should NOT declare completion system variables as locals,
> } 
> } I disagree. The only way we should be passing stuff to #autoload (Type/)
> } functions is with the positional parameters.
> 
> I agree with your "should" but I don't believe that it's presently the
> case that all completion functions work that way.  Blindly adding a lot
> of "local" declarations without investigating the calling contexts is
> a road to mysterious future breakage.

I might be missing something, but isn't leaving these few exceptions
only encouraging future completion functions to rely on the incorrect
behaviour?
 
<snip>

Regards,
Doug



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