summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2021-12-02 16:47:42 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2021-12-02 16:47:49 +0100
commit4c7faf33776c6566fdb374ae2b54960fc70c3228 (patch)
tree85ba0e1d56b5b652f5b5a33c91e5cd94131dfe1a /lisp/emacs-lisp
parentc469efbd8361cffff72fb6a4aeaeea40c5adf110 (diff)
downloademacs-4c7faf33776c6566fdb374ae2b54960fc70c3228.tar.gz
emacs-4c7faf33776c6566fdb374ae2b54960fc70c3228.tar.bz2
emacs-4c7faf33776c6566fdb374ae2b54960fc70c3228.zip
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.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/macroexp.el11
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el
index 48d9c680cba..a20c424e2bd 100644
--- a/lisp/emacs-lisp/macroexp.el
+++ b/lisp/emacs-lisp/macroexp.el
@@ -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)))