about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Doc/Zsh/grammar.yo5
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index d1dbf5749..06560d2fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-09-19  Peter Stephenson  <pws@csr.com>
+
+	* unposted, c.f. 21735: Doc/Zsh/grammar.yo: document
+	that return at the top level of a script behaves like exit
+	in a try-block.
+
 2005-09-17  Peter Stephenson  <pws@pwstephenson.fsnet.co.uk>
 
 	* 21731: Src/prompt.c, Src/Zle/zle_refresh.c: count multibyte
diff --git a/Doc/Zsh/grammar.yo b/Doc/Zsh/grammar.yo
index d1f3996ef..dd5da93b4 100644
--- a/Doc/Zsh/grammar.yo
+++ b/Doc/Zsh/grammar.yo
@@ -287,8 +287,9 @@ example({
 }
 # The error condition has been reset.)
 
-An tt(exit) command encountered in tt(try-list) does em(not) cause the
-execution of var(always-list).  Instead, the shell exits immediately
+An tt(exit) command (or a tt(return) command executed at the outermost
+function level of a script) encountered in tt(try-list) does em(not) cause
+the execution of var(always-list).  Instead, the shell exits immediately
 after any tt(EXIT) trap has been executed.
 )
 findex(function)