Merge from origin/emacs-26

2860285 Allow macros autoloaded as functions during bytecomp (Bug#36022)
This commit is contained in:
Glenn Morris 2019-06-07 07:50:48 -07:00
commit 5e1e1e71cc

View file

@ -1401,7 +1401,9 @@ when printing the error message."
(defun byte-compile-callargs-warn (form)
(let* ((def (or (byte-compile-fdefinition (car form) nil)
(byte-compile-fdefinition (car form) t)))
(sig (byte-compile--function-signature (or def (car form))))
(sig (cond (def (byte-compile--function-signature def))
((subrp (symbol-function (car form)))
(subr-arity (symbol-function (car form))))))
(ncall (length (cdr form))))
;; Check many or unevalled from subr-arity.
(if (and (cdr-safe sig)