From d307660deeb115dd2061654c2ddcd4407cadb04c Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 8 Aug 2005 16:48:52 +0000 Subject: 21575 plus unposted: Add WARN_CREATE_GLOBAL option --- Doc/Zsh/options.yo | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Doc/Zsh/options.yo') diff --git a/Doc/Zsh/options.yo b/Doc/Zsh/options.yo index e6e6af025..2f0e7d71d 100644 --- a/Doc/Zsh/options.yo +++ b/Doc/Zsh/options.yo @@ -460,6 +460,16 @@ item(tt(UNSET) (tt(PLUS()u), ksh: tt(PLUS()u)) )( Treat unset parameters as if they were empty when substituting. Otherwise they are treated as an error. ) +pindex(WARN_CREATE_GLOBAL) +cindex(parameters, warning when created globally) +item(tt(WARN_CREATE_GLOBAL))( +Print a warning message when a global parameter is created in a function +by an assignment. This often indicates that a parameter has not been +declared local when it should have been. Parameters explicitly declared +global from within a function using tt(typeset -g) do not cause a warning. +Note that there is no warning when a local parameter is assigned to in +a nested function, which may also indicate an error. +) enditem() subsect(History) -- cgit 1.4.1