From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@sunsite.dk
Subject: Re: PATCH: Bug in "zed" with autoloaded functions
Date: Sun, 8 Aug 2004 09:51:35 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.61.0408080946260.16667@toltec.zanshin.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0408080903110.16667@toltec.zanshin.com>
On Sun, 8 Aug 2004, Bart Schaefer wrote:
> Index: Functions/Misc/zed
> ===================================================================
> if [[ $var = *\#\ undefined* ]] then
> autoload +X $1
> + var="$(functions $1)"
Actually I don't like this. It used to be the case that, if one aborted
zed -f of an autoloaded function, the function remained undefined. The
new behavior loads the function unconditionally.
So I propose this instead:
Index: Functions/Misc/zed
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/Misc/zed,v
retrieving revision 1.8
diff -u -r1.8 zed
--- Functions/Misc/zed 23 Jun 2004 16:14:27 -0000 1.8
+++ Functions/Misc/zed 8 Aug 2004 16:49:06 -0000
@@ -74,7 +74,7 @@
var="$(functions $1)"
# If function is undefined but autoloadable, load it
if [[ $var = *\#\ undefined* ]] then
- autoload +X $1
+ var="$(autoload +X $1; functions $1)"
elif [[ -z $var ]] then
var="$1() {
}"
prev parent reply other threads:[~2004-08-08 16:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-08 16:08 Bart Schaefer
2004-08-08 16:51 ` Bart Schaefer [this message]
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=Pine.LNX.4.61.0408080946260.16667@toltec.zanshin.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).