]> git.eshelyaron.com Git - emacs.git/commit
(primitive-function): New type
authorStefan Monnier <monnier@iro.umontreal.ca>
Sun, 17 Mar 2024 21:29:02 +0000 (17:29 -0400)
committerEshel Yaron <me@eshelyaron.com>
Mon, 18 Mar 2024 15:45:50 +0000 (16:45 +0100)
commitee68ba0753fb8bcadbd6e4fb003b185e41ac6efa
tree3f5e8426246f57762b197a818197b03514a48ff7
parent2b66c6e79fb7f6004225b3f6322a41c5e0f99a2f
(primitive-function): New type

The type hierarchy and `cl-type-of` code assumed that `subr-primitive`
only applies to functions, but since it also accepts special-forms it makes
it an unsuitable choice since it can't be a subtype of `compiled-function`.
So, use a new type `primitive-function` instead.

* lisp/subr.el (subr-primitive-p): Fix docstring (bug#69832).
(primitive-function-p): New function.

* lisp/emacs-lisp/cl-preloaded.el (primitive-function): Rename
from `subr-primitive` since `subr-primitive-p` means something else.

* src/data.c (Fcl_type_of): Return `primitive-function` instead
of `subr-primitive` for C functions.
(syms_of_data): Adjust accordingly.

* test/src/data-tests.el (data-tests--cl-type-of): Remove workaround.

(cherry picked from commit e624bc62752ceb2e60940c5fd9cb6e70611df71c)
etc/NEWS
lisp/emacs-lisp/cl-preloaded.el
lisp/subr.el
src/data.c
test/src/data-tests.el