diff options
| author | Stefan Monnier | 2024-03-17 17:29:02 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2024-03-18 09:32:49 -0400 |
| commit | e624bc62752ceb2e60940c5fd9cb6e70611df71c (patch) | |
| tree | 43890e0601aacb600479590fb52ba5440e4fca91 /test/src | |
| parent | 706403f2aa3a306369a0150022da0cba1802ca2b (diff) | |
| download | emacs-e624bc62752ceb2e60940c5fd9cb6e70611df71c.tar.gz emacs-e624bc62752ceb2e60940c5fd9cb6e70611df71c.zip | |
(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.
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/data-tests.el | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/test/src/data-tests.el b/test/src/data-tests.el index 9d76c58224d..daa49e671b5 100644 --- a/test/src/data-tests.el +++ b/test/src/data-tests.el | |||
| @@ -869,9 +869,7 @@ comparing the subr with a much slower Lisp implementation." | |||
| 869 | tree-sitter-node tree-sitter-parser | 869 | tree-sitter-node tree-sitter-parser |
| 870 | ;; `functionp' also matches things of type | 870 | ;; `functionp' also matches things of type |
| 871 | ;; `symbol' and `cons'. | 871 | ;; `symbol' and `cons'. |
| 872 | ;; FIXME: `subr-primitive-p' also matches | 872 | function)) |
| 873 | ;; special-forms. | ||
| 874 | function subr-primitive)) | ||
| 875 | (should-not (cl-typep val subtype))))))))) | 873 | (should-not (cl-typep val subtype))))))))) |
| 876 | 874 | ||
| 877 | 875 | ||