summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2019-06-07 07:50:48 -0700
committerGlenn Morris <rgm@gnu.org>2019-06-07 07:50:48 -0700
commit5e1e1e71ccd5368fb3d7cbbaab9da7b2287a93d9 (patch)
tree60ad1a7b87d02965831b0f463f59f2a4a4fe8e60 /lisp/emacs-lisp
parente5bc9a32b65e16ff48a50d56e3d8b4990e95acac (diff)
parent2860285621eb890697ca122cd6ede8c3f03566d6 (diff)
downloademacs-5e1e1e71ccd5368fb3d7cbbaab9da7b2287a93d9.tar.gz
emacs-5e1e1e71ccd5368fb3d7cbbaab9da7b2287a93d9.tar.bz2
emacs-5e1e1e71ccd5368fb3d7cbbaab9da7b2287a93d9.zip
Merge from origin/emacs-26
2860285 Allow macros autoloaded as functions during bytecomp (Bug#36022)
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/bytecomp.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index dfbda8d43e3..38cce14fd62 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -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)