diff options
Diffstat (limited to 'lisp/help.el')
-rw-r--r-- | lisp/help.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/help.el b/lisp/help.el index 084e941549e..a8af51cd9e7 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -1792,6 +1792,8 @@ ARGLIST can also be t or a string of the form \"(FUN ARG1 ARG2 ...)\"." (error "Unrecognized usage format")) (help--make-usage-docstring 'fn arglist))))) +(declare-function subr-native-lambda-list "data.c") + (defun help-function-arglist (def &optional preserve-names) "Return a formal argument list for the function DEF. If PRESERVE-NAMES is non-nil, return a formal arglist that uses @@ -1807,6 +1809,10 @@ the same names as used in the original source code, when possible." ((and (byte-code-function-p def) (listp (aref def 0))) (aref def 0)) ((eq (car-safe def) 'lambda) (nth 1 def)) ((eq (car-safe def) 'closure) (nth 2 def)) + ((and (featurep 'nativecomp) + (subrp def) + (listp (subr-native-lambda-list def))) + (subr-native-lambda-list def)) ((or (and (byte-code-function-p def) (integerp (aref def 0))) (subrp def) (module-function-p def)) (or (when preserve-names |