From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@sunsite.dk
Subject: Re: PATCH: expl not always local
Date: Thu, 02 Jun 2005 17:02:47 +0000 [thread overview]
Message-ID: <1050602170247.ZM12815@candle.brasslantern.com> (raw)
In-Reply-To: <2817.1117730651@trentino.groupinfra.com>
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.
In part this is because the inner workings of the completion system are
so sketchily documented. The Doc/compsys.yo entry for _wanted, for example,
doesn't use "local expl" in its examples, and none of the documentation is
clear that the name "expl" is merely a convention for the second argument
of things like _request/_wanted/_next_label/etc. (i.e., any other name
ought to do just as well, but probably won't).
next prev parent reply other threads:[~2005-06-02 17:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-02 13:25 Doug Kearns
2005-06-02 15:28 ` Bart Schaefer
2005-06-02 16:44 ` Oliver Kiddle
2005-06-02 17:02 ` Bart Schaefer [this message]
2005-06-06 13:33 ` Doug Kearns
2005-06-06 16:24 ` Bart Schaefer
2005-06-06 17:26 ` Oliver Kiddle
2005-06-07 14:38 ` Oliver Kiddle
2005-06-06 13:33 ` Doug Kearns
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1050602170247.ZM12815@candle.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).