aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref
diff options
context:
space:
mode:
authorEli Zaretskii2024-01-06 12:44:26 +0200
committerEli Zaretskii2024-01-06 12:44:26 +0200
commitd9dabcacefad084cccaa32e4f5fffcb78728fa00 (patch)
tree689d2c79a96f19406e5aaaf0f2e6339312745ba4 /doc/lispref
parent409985288dc83b20b4af2ce4072177fdc06b6ad7 (diff)
downloademacs-d9dabcacefad084cccaa32e4f5fffcb78728fa00.tar.gz
emacs-d9dabcacefad084cccaa32e4f5fffcb78728fa00.zip
; Minor copyedits of doc of 'handler-bind'
* doc/lispref/control.texi (Handling Errors): Fix wording and punctuation.
Diffstat (limited to 'doc/lispref')
-rw-r--r--doc/lispref/control.texi29
1 files changed, 15 insertions, 14 deletions
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi
index 3c9f26262c1..0c6895332a0 100644
--- a/doc/lispref/control.texi
+++ b/doc/lispref/control.texi
@@ -2325,16 +2325,17 @@ error description.
2325 2325
2326Contrary to what happens with @code{condition-case}, @var{handler} is 2326Contrary to what happens with @code{condition-case}, @var{handler} is
2327called in the dynamic context where the error happened. This means it 2327called in the dynamic context where the error happened. This means it
2328is executed unbinding any variable bindings or running any cleanups of 2328is executed without unbinding any variable bindings or running any
2329@code{unwind-protect}, so that all those dynamic bindings are still in 2329cleanups of @code{unwind-protect}, so that all those dynamic bindings
2330effect. There is one exception: while running the @var{handler} 2330are still in effect. There is one exception: while running the
2331function, all the error handlers between the code that signaled the 2331@var{handler} function, all the error handlers between the code that
2332error and the @code{handler-bind} are temporarily suspended, meaning 2332signaled the error and the @code{handler-bind} are temporarily
2333that when an error is signaled, Emacs will only search the active 2333suspended, meaning that when an error is signaled, Emacs will only
2334@code{condition-case} and @code{handler-bind} forms that are inside 2334search the active @code{condition-case} and @code{handler-bind} forms
2335the @var{handler} function or outside of the current 2335that are inside the @var{handler} function or outside of the current
2336@code{handler-bind}. Note also that lexical variables are not 2336@code{handler-bind}. Note also that lexically-bound variables
2337affected, since they do not have dynamic extent. 2337(@pxref{Lexical Binding}) are not affected, since they do not have
2338dynamic extent.
2338 2339
2339Like any normal function, @var{handler} can exit non-locally, 2340Like any normal function, @var{handler} can exit non-locally,
2340typically via @code{throw}, or it can return normally. 2341typically via @code{throw}, or it can return normally.
@@ -2391,10 +2392,10 @@ We can get almost the same result with @code{condition-case}:
2391 2392
2392@noindent 2393@noindent
2393but with the difference that when we (re)signal the new error in 2394but with the difference that when we (re)signal the new error in
2394@code{handler-bind} the dynamic environment from the original error is 2395@code{handler-bind}, the dynamic environment from the original error
2395still active, which means for example that if we enter the 2396is still active, which means for example that if we enter the debugger
2396debugger at this point, it will show us a complete backtrace including 2397at this point, it will show us a complete backtrace including the
2397the point where we signaled the original error: 2398point where we signaled the original error:
2398 2399
2399@example 2400@example
2400@group 2401@group