[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 9d0f5909af: Correct suppression of suspicious eq type warning
From: |
Mattias Engdegård |
Subject: |
master 9d0f5909af: Correct suppression of suspicious eq type warning |
Date: |
Fri, 30 Dec 2022 15:05:07 -0500 (EST) |
branch: master
commit 9d0f5909afc562dc2bdda04a95f64ee25a628185
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
Correct suppression of suspicious eq type warning
* lisp/emacs-lisp/byte-run.el (with-suppressed-warnings):
* lisp/emacs-lisp/bytecomp.el (bytecomp--warn-dodgy-eq-arg):
Suppress warning using (suspicious FUNCTION), where FUNCTION is
not always `eq`.
---
lisp/emacs-lisp/byte-run.el | 3 +--
lisp/emacs-lisp/bytecomp.el | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index d909395e97..697d1d3ee7 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -653,8 +653,7 @@ types. The types that can be suppressed with this macro are
`suspicious' and `empty-body'.
For the `mapcar' case, only the `mapcar' function can be used in
-the symbol list. For `suspicious', only `set-buffer', `lsh' and `eq'
-can be used."
+the symbol list."
;; Note: during compilation, this definition is overridden by the one in
;; byte-compile-initial-macro-environment.
(declare (debug (sexp body)) (indent 1))
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index a41e076f9b..e314976fc1 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -5526,7 +5526,7 @@ and corresponding effects."
(macroexp-warn-and-return
(format "`%s' called with literal %s that may never match (%s)"
(car form) type parenthesis)
- form '(suspicious eq) t))
+ form (list 'suspicious (car form)) t))
(defun bytecomp--check-eq-args (form &optional a b &rest _ignore)
(let* ((number-ok (eq (car form) 'eql))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 9d0f5909af: Correct suppression of suspicious eq type warning,
Mattias Engdegård <=