]> git.eshelyaron.com Git - emacs.git/commit
(cl-labels): Add support for (FUNC EXP) bindings (bug#59786)
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 13 Nov 2024 03:58:53 +0000 (22:58 -0500)
committerEshel Yaron <me@eshelyaron.com>
Fri, 15 Nov 2024 12:42:32 +0000 (13:42 +0100)
commit7c00157d1091ec73db4f47ff0def33a84e6b4c6a
tree09b54b32165c429f4b83bc5fb0cb183da7f2f12f
parent69c86feb1701b0fc33654242339d699bfd3d7217
(cl-labels): Add support for (FUNC EXP) bindings (bug#59786)

Allow `cl-labels` to use the same (FUNC EXP) bindings as were already added
to `cl-flet` in Emacs-25.  The Info doc (mistakenly) already documented this
new feature.

* lisp/emacs-lisp/cl-macs.el (cl--self-tco-on-form): New function.
(cl-labels): Use it to add support for (FUNC EXP) bindings.

* test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs--labels): Add test for
tail-recursive (FUNC EXP) bindings.

(cherry picked from commit 79400f4f18b80cdde72eda86023e41a81d09a164)
etc/NEWS
lisp/emacs-lisp/cl-macs.el
test/lisp/emacs-lisp/cl-macs-tests.el