diff options
| author | Andrea Corallo | 2020-08-31 22:06:49 +0200 |
|---|---|---|
| committer | Andrea Corallo | 2020-08-31 22:36:58 +0200 |
| commit | c6f42387e32a4e99cd9ddd203ab51f3c5694054e (patch) | |
| tree | efa4bc89b6a8cbd12cacc997fef5e78a47a10913 /src/data.c | |
| parent | bce9cad4213f9af8be08311ac2b93add5c93a997 (diff) | |
| download | emacs-c6f42387e32a4e99cd9ddd203ab51f3c5694054e.tar.gz emacs-c6f42387e32a4e99cd9ddd203ab51f3c5694054e.zip | |
Fix describe function arglist for native compiled lisp/d (bug#42572)
* lisp/help.el (help-function-arglist): Handle the case of native
compiled lisp/d.
* src/data.c (syms_of_data): Register new subrs.
(Fsubr_native_dyn_p, Fsubr_native_lambda_list): New primitives.
* test/src/comp-tests.el (comp-tests-dynamic-help-arglist): New test.
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/src/data.c b/src/data.c index 33711368f13..b7955932b85 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -875,14 +875,37 @@ SUBR must be a built-in function. */) | |||
| 875 | } | 875 | } |
| 876 | 876 | ||
| 877 | DEFUN ("subr-native-elisp-p", Fsubr_native_elisp_p, Ssubr_native_elisp_p, 1, 1, | 877 | DEFUN ("subr-native-elisp-p", Fsubr_native_elisp_p, Ssubr_native_elisp_p, 1, 1, |
| 878 | 0, doc: /* Return t if the object is native compiled lisp function, | 878 | 0, doc: /* Return t if the object is native compiled lisp |
| 879 | nil otherwise. */) | 879 | function, nil otherwise. */) |
| 880 | (Lisp_Object object) | 880 | (Lisp_Object object) |
| 881 | { | 881 | { |
| 882 | return SUBR_NATIVE_COMPILEDP (object) ? Qt : Qnil; | 882 | return SUBR_NATIVE_COMPILEDP (object) ? Qt : Qnil; |
| 883 | } | 883 | } |
| 884 | 884 | ||
| 885 | #ifdef HAVE_NATIVE_COMP | 885 | #ifdef HAVE_NATIVE_COMP |
| 886 | |||
| 887 | DEFUN ("subr-native-dyn-p", Fsubr_native_dyn_p, | ||
| 888 | Ssubr_native_dyn_p, 1, 1, 0, | ||
| 889 | doc: /* Return t if the subr is native compiled lisp/d | ||
| 890 | function, nil otherwise. */) | ||
| 891 | (Lisp_Object subr) | ||
| 892 | { | ||
| 893 | return SUBR_NATIVE_COMPILED_DYNP (subr) ? Qt : Qnil; | ||
| 894 | } | ||
| 895 | |||
| 896 | DEFUN ("subr-native-lambda-list", Fsubr_native_lambda_list, | ||
| 897 | Ssubr_native_lambda_list, 1, 1, 0, | ||
| 898 | doc: /* Return the lambda list of native compiled lisp/d | ||
| 899 | function. */) | ||
| 900 | (Lisp_Object subr) | ||
| 901 | { | ||
| 902 | CHECK_SUBR (subr); | ||
| 903 | |||
| 904 | return SUBR_NATIVE_COMPILED_DYNP (subr) | ||
| 905 | ? XSUBR (subr)->lambda_list[0] | ||
| 906 | : Qnil; | ||
| 907 | } | ||
| 908 | |||
| 886 | DEFUN ("subr-native-comp-unit", Fsubr_native_comp_unit, | 909 | DEFUN ("subr-native-comp-unit", Fsubr_native_comp_unit, |
| 887 | Ssubr_native_comp_unit, 1, 1, 0, | 910 | Ssubr_native_comp_unit, 1, 1, 0, |
| 888 | doc: /* Return the native compilation unit. */) | 911 | doc: /* Return the native compilation unit. */) |
| @@ -4028,6 +4051,8 @@ syms_of_data (void) | |||
| 4028 | defsubr (&Ssubr_name); | 4051 | defsubr (&Ssubr_name); |
| 4029 | defsubr (&Ssubr_native_elisp_p); | 4052 | defsubr (&Ssubr_native_elisp_p); |
| 4030 | #ifdef HAVE_NATIVE_COMP | 4053 | #ifdef HAVE_NATIVE_COMP |
| 4054 | defsubr (&Ssubr_native_dyn_p); | ||
| 4055 | defsubr (&Ssubr_native_lambda_list); | ||
| 4031 | defsubr (&Ssubr_native_comp_unit); | 4056 | defsubr (&Ssubr_native_comp_unit); |
| 4032 | defsubr (&Snative_comp_unit_file); | 4057 | defsubr (&Snative_comp_unit_file); |
| 4033 | defsubr (&Snative_comp_unit_set_file); | 4058 | defsubr (&Snative_comp_unit_set_file); |