diff options
| author | Stefan Monnier | 2023-12-27 15:06:32 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2023-12-28 01:17:21 -0500 |
| commit | b925152bffce30abbd48361af6858cd45b785d84 (patch) | |
| tree | 8e5e23cc5fd1a308767e5c3855ab0cba4a9df7d0 /src/bytecode.c | |
| parent | c89b234405f8fa6c52f83104a46a4a2c3121198f (diff) | |
| download | emacs-b925152bffce30abbd48361af6858cd45b785d84.tar.gz emacs-b925152bffce30abbd48361af6858cd45b785d84.zip | |
(signal_or_quit): Preserve error object identity
Make sure we build the (ERROR-SYMBOL . ERROR-DATA) object only once
when signaling an error, so that its `eq` identity can be used.
It also gets us a tiny bit closer to having real "error objects"
like in most other current programming languages.
* src/eval.c (maybe_call_debugger): Change arglist to receive the error
object instead of receiving the signal and the data separately.
(signal_or_quit): Build the error object right at the beginning so it
stays `eq` to itself.
Rename the `keyboard_quit` arg to `continuable` so say what it does
rather than what it's used for.
(signal_quit_p): Change arg to be the error object rather than just the
error-symbol.
* src/keyboard.c (cmd_error_internal, menu_item_eval_property_1):
Adjust calls to `signal_quit_p` accordingly.
* test/src/eval-tests.el (eval-tests--error-id): New test.
Diffstat (limited to 'src/bytecode.c')
0 files changed, 0 insertions, 0 deletions