Fix lsh warning shortcomings (bug#56641)

Reported by Basil Contovounesios.

* etc/NEWS: Mention how to suppress the warning.
* lisp/emacs-lisp/byte-run.el (with-suppressed-warnings): Amend doc string.
* lisp/subr.el: Use `macroexp-warn-and-return` to delay the warning
until codegen time (which makes it suppressible) and to prevent
repeated warnings.
* test/lisp/international/ccl-tests.el (shift):
* test/src/data-tests.el (data-tests-ash-lsh):
Suppress warning in tests of `lsh` itself.
This commit is contained in:
Mattias Engdegård 2022-07-23 18:42:11 +02:00
parent 26f4bcc6d7
commit 96926fa6eb
5 changed files with 29 additions and 25 deletions

View file

@ -672,7 +672,7 @@ types. The types that can be suppressed with this macro are
`suspicious'.
For the `mapcar' case, only the `mapcar' function can be used in
the symbol list. For `suspicious', only `set-buffer' can be used."
the symbol list. For `suspicious', only `set-buffer' and `lsh' can be used."
;; Note: during compilation, this definition is overridden by the one in
;; byte-compile-initial-macro-environment.
(declare (debug (sexp body)) (indent 1))