]> git.eshelyaron.com Git - emacs.git/commit
Add condition-case success handler (bug#47677)
authorMattias Engdegård <mattiase@acm.org>
Wed, 7 Apr 2021 09:31:07 +0000 (11:31 +0200)
committerMattias Engdegård <mattiase@acm.org>
Thu, 15 Apr 2021 13:41:13 +0000 (15:41 +0200)
commit7893945cc8f9421d0be5b07b9ed404bdf25ce140
tree1e3740a75827ed18c542f41b88ca9013120b3920
parent31f8ae53beb9bada58750160c1bf7f867ecd442e
Add condition-case success handler (bug#47677)

Allow a condition-case handler on the form (:success BODY) to be
specified as the success continuation of the protected form, with
the specified variable bound to its result.

* src/eval.c (Fcondition_case): Update the doc string.
(internal_lisp_condition_case): Implement in interpreter.
(syms_of_eval): Defsym :success.
* lisp/emacs-lisp/bytecomp.el (byte-compile-condition-case):
Implement in byte-compiler.
* lisp/emacs-lisp/cl-macs.el (cl--self-tco): Allow self-TCO
from success handler.
* doc/lispref/control.texi (Handling Errors): Update manual.
* etc/NEWS: Announce.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases)
(bytecomp-condition-case-success):
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs--labels):
Add test cases.
doc/lispref/control.texi
etc/NEWS
lisp/emacs-lisp/bytecomp.el
lisp/emacs-lisp/cl-macs.el
src/eval.c
test/lisp/emacs-lisp/bytecomp-tests.el
test/lisp/emacs-lisp/cl-macs-tests.el