]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix previous macroexp--warn-wrap change
authorLars Ingebrigtsen <larsi@gnus.org>
Thu, 2 Dec 2021 15:47:42 +0000 (16:47 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Thu, 2 Dec 2021 15:47:49 +0000 (16:47 +0100)
* lisp/emacs-lisp/macroexp.el (macroexp--warn-wrap): Don't call
byte-compile-warning-enabled-p with zero parameters.

lisp/emacs-lisp/macroexp.el

index 48d9c680cba35e8342aa87bb6af7595b2e5b5887..a20c424e2bd63bfdfef44529af98b956561a4cde 100644 (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)))