1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-05-23 16:36:05 +02:00
zsh/Etc
Daniel Shahaf a0c0aa41d2 45111: zshmisc(1): Clarify the documentation of 'return' and 'exit' in conjunction with try/always
Having reviewed 20076, 20084, 21734, and 21735, my understanding is that
the original intention was:

- A 'return' in a function does run always-list
- An 'exit' outside a function does not run always-list
- A 'return' outside a function is treated as an 'exit'

All of which are the case today.  The remaining case, of 'exit' used
inside a function, was not specified by the referenced -workers@ posts;
does, as implemented, run the always-list; and furthermore, based in
21734 it's fair to assume that the original documentation was assuming
that 'exit' would be used outside of any function, just like it assumed
'return' would be used inside a function.

Therefore, have the documentation specify only the behaviour of 'exit'
outside any function, and leave the behaviour of 'exit' inside
a function unspecified.  Anyone who relied on the documentation of 'exit'
as documented until this commit would have run into the
documentation/implementation discrepancy described in 45075.
2019-12-22 03:21:09 +00:00
..
.cvsignore unposted: cvsignore VIM *.swp files 2003-05-05 06:14:49 +00:00
.distfiles 33047: use git to simplify massively source distribution file selection 2014-08-23 21:01:58 +01:00
.gitignore unposted: .gitignore generated FAQ*.html files 2014-08-23 20:52:37 +01:00
BUGS 45111: zshmisc(1): Clarify the documentation of 'return' and 'exit' in conjunction with try/always 2019-12-22 03:21:09 +00:00
CONTRIBUTORS unposted: expand CONTRIBUTORS 2011-05-26 09:37:26 +00:00
ChangeLog-3.0 unposted, see 32054: Rationalise character encoding. 2013-11-27 15:56:44 +00:00
ChangeLog-3.1 unposted, see 32054: Rationalise character encoding. 2013-11-27 15:56:44 +00:00
ChangeLog-4.1 20126: tidy up before 4.2.1 2004-07-02 15:59:07 +00:00
ChangeLog-4.3 40035: Cosmetic fixes for comments and documentation. 2016-11-29 17:13:52 +00:00
FAQ.yo unposted: Test release: 5.7.1-test-1 2019-12-14 12:50:58 -06:00
FTP-README 23629: change references to "beta" to "dev" or "development". 2007-07-02 14:30:46 +00:00
Makefile.in 43333: Generate FAQ.html in the builddir, rather than in the srcdir, and add it to the default target of the Etc/ subdirectory. 2018-09-03 13:38:26 +00:00
NEWS-4.3 30400 plus extra tweaks: update NEWS for 5.0 2012-04-13 22:26:41 +00:00
STD-TODO mention that typeset doesn't default parameters to scalar in ksh 2002-10-09 13:19:26 +00:00
TODO 16689: list some things to do. 2002-02-21 13:44:13 +00:00
changelog2html.pl unposted, c.f. 27313: mailing list and website moved 2009-10-22 09:28:02 +00:00
completion-style-guide 44969: completion-style-guide: Mention defaults and superfluous descriptions 2019-12-02 17:29:45 -06:00
creating-a-release.txt 45101: Adjust white space 2019-12-21 20:58:37 -06:00
pubring.pgp Initial revision 1999-04-15 18:05:35 +00:00
relnote_4.3.5.txt users/12527: add release note for 4.3.5 2008-02-01 13:55:10 +00:00
relnote_4.3.6.txt unposted: 4.3.5-dev-4 2008-03-31 15:03:07 +00:00
relnote_4.3.7.txt 4.3.9 2008-10-30 12:18:54 +00:00
relnote_4.3.8.txt 4.3.9 2008-10-30 12:18:54 +00:00
relnote_4.3.9.txt 4.3.9 2008-10-30 12:18:54 +00:00
relnote_4.3.10.txt 26853 + typo fix: package docs 2009-04-21 09:33:30 +00:00
relnote_4.3.12.txt update and tigy up for 4.3.12-test-2 2011-10-17 17:30:48 +00:00
relnote_5.0.0.txt add 5.0.0 release note 2012-08-14 19:34:22 +00:00
zsh-development-guide 45003: Fix more documentation typos 2019-12-11 02:37:39 +00:00