summary refs log tree commit diff
path: root/Doc/Zsh
diff options
context:
space:
mode:
authorPeter Stephenson <p.w.stephenson@ntlworld.com>2014-06-13 21:39:44 +0100
committerPeter Stephenson <p.w.stephenson@ntlworld.com>2014-06-13 21:39:44 +0100
commitb5198b10a1d1b6a15c583eecf12fda0c08b19ad6 (patch)
tree9f4c71809d8480bfb3e771fdfdd70439c29df50e /Doc/Zsh
parentd6698d89a6ff9e644ee608c1d08ff21911f9fb27 (diff)
downloadzsh-b5198b10a1d1b6a15c583eecf12fda0c08b19ad6.tar.gz
zsh-b5198b10a1d1b6a15c583eecf12fda0c08b19ad6.tar.xz
zsh-b5198b10a1d1b6a15c583eecf12fda0c08b19ad6.zip
32768 with further modifications: LOCAL_LOOPS option.
Diffstat (limited to 'Doc/Zsh')
-rw-r--r--Doc/Zsh/options.yo23
1 files changed, 19 insertions, 4 deletions
diff --git a/Doc/Zsh/options.yo b/Doc/Zsh/options.yo
index 7788cd755..9cb385e49 100644
--- a/Doc/Zsh/options.yo
+++ b/Doc/Zsh/options.yo
@@ -1631,6 +1631,21 @@ tt(FUNCTION_ARGZERO) from on to off (or off to on) does not change the
 current value of tt($0).  Only the state upon entry to the function or
 script has an effect.  Compare tt(POSIX_ARGZERO).
 )
+pindex(LOCAL_LOOPS)
+pindex(NO_LOCAL_LOOPS)
+pindex(LOCALLOOPS)
+pindex(NOLOCALLOOPS)
+cindex(break, inside function)
+cindex(continue, inside function)
+cinde(function, scope of break and continue)
+item(tt(LOCAL_LOOPS))(
+When this option is not set, the effect of tt(break) and tt(continue)
+commands may propagate outside function scope, affecting loops in
+calling functions.  When the option is set in a calling function, a
+tt(break) or a tt(continue) that is not caught within a called function
+(regardless of the setting of the option within that function)
+produces a warning and the effect is cancelled.
+)
 pindex(LOCAL_OPTIONS)
 pindex(NO_LOCAL_OPTIONS)
 pindex(LOCALOPTIONS)
@@ -1639,10 +1654,10 @@ item(tt(LOCAL_OPTIONS) <K>)(
 If this option is set at the point of return from a shell function,
 most options (including this one) which were in force upon entry to
 the function are restored; options that are not restored are
-tt(PRIVILEGED) and tt(RESTRICTED).  Otherwise, only this option and the
-tt(XTRACE) and tt(PRINT_EXIT_VALUE) options are restored.  Hence
-if this is explicitly unset by a shell function the other options in
-force at the point of return will remain so.
+tt(PRIVILEGED) and tt(RESTRICTED).  Otherwise, only this option,
+and the tt(LOCAL_LOOPS), tt(XTRACE) and tt(PRINT_EXIT_VALUE) options are
+restored.  Hence if this is explicitly unset by a shell function the
+other options in force at the point of return will remain so.
 A shell function can also guarantee itself a known shell configuration
 with a formulation like `tt(emulate -L zsh)'; the tt(-L) activates
 tt(LOCAL_OPTIONS).