summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/options.c1
-rw-r--r--Src/parse.c3
-rw-r--r--Src/zsh.h1
3 files changed, 5 insertions, 0 deletions
diff --git a/Src/options.c b/Src/options.c
index 80e05b343..3c7f88048 100644
--- a/Src/options.c
+++ b/Src/options.c
@@ -181,6 +181,7 @@ static struct optname optns[] = {
 			      0
 #endif
 			      },			 MULTIBYTE},
+{{NULL, "multifuncdef",	      OPT_EMULATE|OPT_ZSH},	 MULTIFUNCDEF},
 {{NULL, "multios",	      OPT_EMULATE|OPT_ZSH},	 MULTIOS},
 {{NULL, "nomatch",	      OPT_EMULATE|OPT_NONBOURNE},NOMATCH},
 {{NULL, "notify",	      OPT_ZSH},			 NOTIFY},
diff --git a/Src/parse.c b/Src/parse.c
index 0812f9137..1b9a561e0 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -1663,6 +1663,9 @@ par_simple(int *complex, int nr)
 	    zlong oldlineno = lineno;
 	    int onp, so, oecssub = ecssub;
 
+	    if (!isset(MULTIFUNCDEF) && argc > 1)
+		YYERROR(oecused);
+
 	    *complex = c;
 	    lineno = 0;
 	    incmdpos = 1;
diff --git a/Src/zsh.h b/Src/zsh.h
index 9326e1a11..1e043bf29 100644
--- a/Src/zsh.h
+++ b/Src/zsh.h
@@ -1882,6 +1882,7 @@ enum {
     MENUCOMPLETE,
     MONITOR,
     MULTIBYTE,
+    MULTIFUNCDEF,
     MULTIOS,
     NOMATCH,
     NOTIFY,