Fix #4317: wrong-type-arg: number-or-marker-p many

Caused by a func-arity call on an advised function (returns the arity of
the advice, rather than the advised function itself).
This commit is contained in:
Henrik Lissner 2020-11-25 13:48:38 -05:00
parent 65b56a5671
commit 90f16eaa76
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -288,13 +288,17 @@ config.el instead."
(after! comp
;; Support the deprecated name for comp-deferred-compilation-deny-list
;; (changed in feature/native-comp@6104ab0f)
;; DEPRECATED Remove months down the road.
(unless (boundp 'comp-deferred-compilation-deny-list)
(defvaralias 'comp-deferred-compilation-deny-list
'comp-deferred-compilation-black-list))
;; Support native-compile-async lacking selector parameter
;; (added in feature/native-comp@7a8370ed)
(when (< (cdr (func-arity #'native-compile-async)) 4)
;; DEPRECATED Remove months down the road.
(when (and (not (advice-member-p 'doom--native-compile-async-a
'native-compile-async))
(< (cdr (func-arity #'native-compile-async)) 4))
(defadvice! doom--native-compile-async-a (orig-fn paths &optional recursively load _selector)
:around #'native-compile-async
(if (fboundp 'native--compile-async)