diff options
| author | Stefan Monnier | 2024-05-22 13:45:39 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2024-05-28 20:52:40 -0400 |
| commit | 1a1170cde7e847f4eb4d736a400f7325f2265a1c (patch) | |
| tree | 27440a0876eff421bcdc6c8a0f3269533321d3ca /src | |
| parent | 0ae66c1917609832f2456b8207743468439926ae (diff) | |
| download | emacs-1a1170cde7e847f4eb4d736a400f7325f2265a1c.tar.gz emacs-1a1170cde7e847f4eb4d736a400f7325f2265a1c.zip | |
Rename `subr-native-elisp` to `native-comp-function` (bug#71123)
Now that this type name is displayed in *Help*, it is more
important to use a name that is less weird for the unsuspecting user.
* lisp/emacs-lisp/cl-preloaded.el (cl-functionp): Adjust to new name of
native function's type.
(subr-native-elisp-p): Redefine as an obsolete alias.
(native-comp-function): Rename from `subr-native-elisp`
* src/data.c (Fcl_type_of): Return `Qnative_comp_function` i.s.o
`Qsubr_native_elisp`.
(Fnative_comp_function_p): Rename from `Fsubr_native_elisp_p`.
(syms_of_data): Adjust accordingly.
* src/doc.c (Fsubr_documentation): Use new `Fnative_comp_function_p` name.
Diffstat (limited to 'src')
| -rw-r--r-- | src/data.c | 12 | ||||
| -rw-r--r-- | src/doc.c | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/data.c b/src/data.c index be7ae023d8d..e6106a1dbdf 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -239,7 +239,7 @@ a fixed set of types. */) | |||
| 239 | case PVEC_WINDOW: return Qwindow; | 239 | case PVEC_WINDOW: return Qwindow; |
| 240 | case PVEC_SUBR: | 240 | case PVEC_SUBR: |
| 241 | return XSUBR (object)->max_args == UNEVALLED ? Qspecial_form | 241 | return XSUBR (object)->max_args == UNEVALLED ? Qspecial_form |
| 242 | : SUBR_NATIVE_COMPILEDP (object) ? Qsubr_native_elisp | 242 | : SUBR_NATIVE_COMPILEDP (object) ? Qnative_comp_function |
| 243 | : Qprimitive_function; | 243 | : Qprimitive_function; |
| 244 | case PVEC_CLOSURE: | 244 | case PVEC_CLOSURE: |
| 245 | return CONSP (AREF (object, CLOSURE_CODE)) | 245 | return CONSP (AREF (object, CLOSURE_CODE)) |
| @@ -1055,9 +1055,8 @@ SUBR must be a built-in function. */) | |||
| 1055 | return build_string (name); | 1055 | return build_string (name); |
| 1056 | } | 1056 | } |
| 1057 | 1057 | ||
| 1058 | DEFUN ("subr-native-elisp-p", Fsubr_native_elisp_p, Ssubr_native_elisp_p, 1, 1, | 1058 | DEFUN ("native-comp-function-p", Fnative_comp_function_p, Snative_comp_function_p, 1, 1, |
| 1059 | 0, doc: /* Return t if the object is native compiled lisp | 1059 | 0, doc: /* Return t if the object is native compiled Lisp function, nil otherwise. */) |
| 1060 | function, nil otherwise. */) | ||
| 1061 | (Lisp_Object object) | 1060 | (Lisp_Object object) |
| 1062 | { | 1061 | { |
| 1063 | return SUBR_NATIVE_COMPILEDP (object) ? Qt : Qnil; | 1062 | return SUBR_NATIVE_COMPILEDP (object) ? Qt : Qnil; |
| @@ -4163,7 +4162,8 @@ syms_of_data (void) | |||
| 4163 | DEFSYM (Qsubr, "subr"); | 4162 | DEFSYM (Qsubr, "subr"); |
| 4164 | DEFSYM (Qspecial_form, "special-form"); | 4163 | DEFSYM (Qspecial_form, "special-form"); |
| 4165 | DEFSYM (Qprimitive_function, "primitive-function"); | 4164 | DEFSYM (Qprimitive_function, "primitive-function"); |
| 4166 | DEFSYM (Qsubr_native_elisp, "subr-native-elisp"); | 4165 | DEFSYM (Qsubr_native_elisp, "subr-native-elisp"); /* Deprecated name. */ |
| 4166 | DEFSYM (Qnative_comp_function, "native-comp-function"); | ||
| 4167 | DEFSYM (Qbyte_code_function, "byte-code-function"); | 4167 | DEFSYM (Qbyte_code_function, "byte-code-function"); |
| 4168 | DEFSYM (Qinterpreted_function, "interpreted-function"); | 4168 | DEFSYM (Qinterpreted_function, "interpreted-function"); |
| 4169 | DEFSYM (Qbuffer, "buffer"); | 4169 | DEFSYM (Qbuffer, "buffer"); |
| @@ -4298,7 +4298,7 @@ syms_of_data (void) | |||
| 4298 | defsubr (&Sbyteorder); | 4298 | defsubr (&Sbyteorder); |
| 4299 | defsubr (&Ssubr_arity); | 4299 | defsubr (&Ssubr_arity); |
| 4300 | defsubr (&Ssubr_name); | 4300 | defsubr (&Ssubr_name); |
| 4301 | defsubr (&Ssubr_native_elisp_p); | 4301 | defsubr (&Snative_comp_function_p); |
| 4302 | defsubr (&Ssubr_native_lambda_list); | 4302 | defsubr (&Ssubr_native_lambda_list); |
| 4303 | defsubr (&Ssubr_type); | 4303 | defsubr (&Ssubr_type); |
| 4304 | #ifdef HAVE_NATIVE_COMP | 4304 | #ifdef HAVE_NATIVE_COMP |
| @@ -392,7 +392,7 @@ DEFUN ("internal-subr-documentation", Fsubr_documentation, Ssubr_documentation, | |||
| 392 | (Lisp_Object function) | 392 | (Lisp_Object function) |
| 393 | { | 393 | { |
| 394 | #ifdef HAVE_NATIVE_COMP | 394 | #ifdef HAVE_NATIVE_COMP |
| 395 | if (!NILP (Fsubr_native_elisp_p (function))) | 395 | if (!NILP (Fnative_comp_function_p (function))) |
| 396 | return native_function_doc (function); | 396 | return native_function_doc (function); |
| 397 | else | 397 | else |
| 398 | #endif | 398 | #endif |