Fix previous macroexp--warn-wrap change

* lisp/emacs-lisp/macroexp.el (macroexp--warn-wrap): Don't call
byte-compile-warning-enabled-p with zero parameters.
This commit is contained in:
Lars Ingebrigtsen 2021-12-02 16:47:42 +01:00
parent c469efbd83
commit 4c7faf3377

View file

@ -136,11 +136,12 @@ Other uses risk returning non-nil value that point to the wrong file."
(defvar macroexp--warned (make-hash-table :test #'equal :weakness 'key))
(defun macroexp--warn-wrap (msg form category)
(let ((when-compiled (lambda ()
(when (if (listp category)
(apply #'byte-compile-warning-enabled-p category)
(byte-compile-warning-enabled-p category))
(byte-compile-warn "%s" msg)))))
(let ((when-compiled
(lambda ()
(when (if (consp category)
(apply #'byte-compile-warning-enabled-p category)
(byte-compile-warning-enabled-p category))
(byte-compile-warn "%s" msg)))))
`(progn
(macroexp--funcall-if-compiled ',when-compiled)
,form)))