1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-28 00:01:33 -08:00
emacs/test/src
Stefan Monnier 5ba75e183c New special form handler-bind
AFAIK, this provides the same semantics as Common Lisp's `handler-bind`,
modulo the differences about how error objects and conditions are
represented.

* lisp/subr.el (handler-bind): New macro.

* src/eval.c (pop_handler): New function.
(Fhandler_Bind_1): New function.
(signal_or_quit): Handle new handlertypes `HANDLER` and `SKIP_CONDITIONS`.
(find_handler_clause): Simplify.
(syms_of_eval): Defsubr `Fhandler_bind_1`.

* doc/lispref/control.texi (Handling Errors): Add `handler-bind`.

* test/src/eval-tests.el (eval-tests--handler-bind): New test.

* lisp/emacs-lisp/lisp-mode.el (lisp-font-lock-keywords):
Move 'handler-bind' from CL-only to generic Lisp.
(handler-bind): Remove indentation setting, it now lives in the macro
definition.
2024-01-04 16:32:53 -05:00
..
comp-resources ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
emacs-module-resources ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
lread-resources Make force-load-doc-strings work again 2022-08-07 10:25:03 +02:00
regex-resources * src/regex-emacs.c (analyze_first): Fix incorrect optimization 2023-09-27 13:29:50 -04:00
syntax-resources
alloc-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
buffer-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
callint-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
callproc-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
casefiddle-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
character-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
charset-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
chartab-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
cmds-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
coding-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
comp-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
data-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
decompress-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
doc-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
editfns-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
emacs-module-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
emacs-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
eval-tests.el New special form handler-bind 2024-01-04 16:32:53 -05:00
fileio-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
filelock-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
floatfns-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
fns-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
font-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
image-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
indent-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
inotify-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
json-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
keyboard-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
keymap-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
lcms-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
lread-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
marker-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
minibuf-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
print-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
process-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
regex-emacs-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
search-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
sqlite-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
syntax-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
textprop-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
thread-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
timefns-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
treesit-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
undo-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
xdisp-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
xfaces-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
xml-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00