* PATCH: Re: function declaration syntax
@ 2000-06-29 12:06 Sven Wischnowsky
0 siblings, 0 replies; only message in thread
From: Sven Wischnowsky @ 2000-06-29 12:06 UTC (permalink / raw)
To: zsh-workers
Peter Stephenson wrote:
> Did anybody notice that according to the manual (and the reference card,
> which was how I noticed) this was supposed to work?
>
> % fn() print foo
> # Looks like it worked...
> % which fn
> fn() {
> print foo
> }
> # but it doesn't.
> % fn
> %
>
> Either we should fix it or remove it.
My fault, I guess. I have a faint memory of having tested it, but that
was probably before the last changes to the word code stuff.
Bye
Sven
P.S.: The comments in parse.c talk about a list1 being allowed there,
which would be a sublist. The manual says it's a command. It
would be easy to change...
Index: Src/parse.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/parse.c,v
retrieving revision 1.9
diff -u -r1.9 parse.c
--- Src/parse.c 2000/06/14 09:26:56 1.9
+++ Src/parse.c 2000/06/29 12:05:34
@@ -1516,10 +1516,11 @@
}
yylex();
} else {
- int ll, sl, c = 0;
+ int ll, sl, pl, c = 0;
ll = ecadd(0);
sl = ecadd(0);
+ pl = ecadd(WCB_PIPE(WC_PIPE_END, 0));
par_cmd(&c);
Index: Test/09funcdef.ztst
===================================================================
RCS file: /cvsroot/zsh/zsh/Test/09funcdef.ztst,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 09funcdef.ztst
--- Test/09funcdef.ztst 2000/01/31 11:46:35 1.1.1.1
+++ Test/09funcdef.ztst 2000/06/29 12:05:35
@@ -6,3 +6,8 @@
f$$
0:Regression test: `function f$$ () { ... }'
>regress expansion of function names
+
+ function foo () print bar
+ foo
+0:Function definition without braces
+>bar
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-06-29 12:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-29 12:06 PATCH: Re: function declaration syntax Sven Wischnowsky
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).