diff options
| author | Mattias EngdegÄrd | 2022-12-30 13:48:47 +0100 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2022-12-30 21:03:34 +0100 |
| commit | 9d0f5909afc562dc2bdda04a95f64ee25a628185 (patch) | |
| tree | 40ad83e18f01acb152c0f2e5b97605c5fc68fb8f | |
| parent | a77204c64659147794b1c9f4114091a257205a49 (diff) | |
| download | emacs-9d0f5909afc562dc2bdda04a95f64ee25a628185.tar.gz emacs-9d0f5909afc562dc2bdda04a95f64ee25a628185.zip | |
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`.
| -rw-r--r-- | lisp/emacs-lisp/byte-run.el | 3 | ||||
| -rw-r--r-- | 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 d909395e973..697d1d3ee74 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 | |||
| 653 | `suspicious' and `empty-body'. | 653 | `suspicious' and `empty-body'. |
| 654 | 654 | ||
| 655 | For the `mapcar' case, only the `mapcar' function can be used in | 655 | For the `mapcar' case, only the `mapcar' function can be used in |
| 656 | the symbol list. For `suspicious', only `set-buffer', `lsh' and `eq' | 656 | the symbol list." |
| 657 | can be used." | ||
| 658 | ;; Note: during compilation, this definition is overridden by the one in | 657 | ;; Note: during compilation, this definition is overridden by the one in |
| 659 | ;; byte-compile-initial-macro-environment. | 658 | ;; byte-compile-initial-macro-environment. |
| 660 | (declare (debug (sexp body)) (indent 1)) | 659 | (declare (debug (sexp body)) (indent 1)) |
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index a41e076f9b0..e314976fc1a 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -5526,7 +5526,7 @@ and corresponding effects." | |||
| 5526 | (macroexp-warn-and-return | 5526 | (macroexp-warn-and-return |
| 5527 | (format "`%s' called with literal %s that may never match (%s)" | 5527 | (format "`%s' called with literal %s that may never match (%s)" |
| 5528 | (car form) type parenthesis) | 5528 | (car form) type parenthesis) |
| 5529 | form '(suspicious eq) t)) | 5529 | form (list 'suspicious (car form)) t)) |
| 5530 | 5530 | ||
| 5531 | (defun bytecomp--check-eq-args (form &optional a b &rest _ignore) | 5531 | (defun bytecomp--check-eq-args (form &optional a b &rest _ignore) |
| 5532 | (let* ((number-ok (eq (car form) 'eql)) | 5532 | (let* ((number-ok (eq (car form) 'eql)) |