diff options
| author | Eli Zaretskii | 2024-01-06 12:44:26 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2024-01-06 12:44:26 +0200 |
| commit | d9dabcacefad084cccaa32e4f5fffcb78728fa00 (patch) | |
| tree | 689d2c79a96f19406e5aaaf0f2e6339312745ba4 /doc/lispref | |
| parent | 409985288dc83b20b4af2ce4072177fdc06b6ad7 (diff) | |
| download | emacs-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.texi | 29 |
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 | ||
| 2326 | Contrary to what happens with @code{condition-case}, @var{handler} is | 2326 | Contrary to what happens with @code{condition-case}, @var{handler} is |
| 2327 | called in the dynamic context where the error happened. This means it | 2327 | called in the dynamic context where the error happened. This means it |
| 2328 | is executed unbinding any variable bindings or running any cleanups of | 2328 | is executed without unbinding any variable bindings or running any |
| 2329 | @code{unwind-protect}, so that all those dynamic bindings are still in | 2329 | cleanups of @code{unwind-protect}, so that all those dynamic bindings |
| 2330 | effect. There is one exception: while running the @var{handler} | 2330 | are still in effect. There is one exception: while running the |
| 2331 | function, all the error handlers between the code that signaled the | 2331 | @var{handler} function, all the error handlers between the code that |
| 2332 | error and the @code{handler-bind} are temporarily suspended, meaning | 2332 | signaled the error and the @code{handler-bind} are temporarily |
| 2333 | that when an error is signaled, Emacs will only search the active | 2333 | suspended, meaning that when an error is signaled, Emacs will only |
| 2334 | @code{condition-case} and @code{handler-bind} forms that are inside | 2334 | search the active @code{condition-case} and @code{handler-bind} forms |
| 2335 | the @var{handler} function or outside of the current | 2335 | that 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 |
| 2337 | affected, since they do not have dynamic extent. | 2337 | (@pxref{Lexical Binding}) are not affected, since they do not have |
| 2338 | dynamic extent. | ||
| 2338 | 2339 | ||
| 2339 | Like any normal function, @var{handler} can exit non-locally, | 2340 | Like any normal function, @var{handler} can exit non-locally, |
| 2340 | typically via @code{throw}, or it can return normally. | 2341 | typically 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 |
| 2393 | but with the difference that when we (re)signal the new error in | 2394 | but 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 |
| 2395 | still active, which means for example that if we enter the | 2396 | is still active, which means for example that if we enter the debugger |
| 2396 | debugger at this point, it will show us a complete backtrace including | 2397 | at this point, it will show us a complete backtrace including the |
| 2397 | the point where we signaled the original error: | 2398 | point where we signaled the original error: |
| 2398 | 2399 | ||
| 2399 | @example | 2400 | @example |
| 2400 | @group | 2401 | @group |