summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2022-07-23 18:42:11 +0200
committerMattias EngdegÄrd <mattiase@acm.org>2022-07-23 18:42:11 +0200
commit96926fa6eb0f71f47586d50ac5532b57bff1ab54 (patch)
tree4f277a5e35b9c941b32d75b028e0900d31bbb214 /etc
parent26f4bcc6d7cd541fab981836ee0b67259280ff4b (diff)
downloademacs-96926fa6eb0f71f47586d50ac5532b57bff1ab54.tar.gz
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.
Diffstat (limited to 'etc')
-rw-r--r--etc/NEWS4
1 files changed, 3 insertions, 1 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 412a93bbf99..27046894ad4 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2336,7 +2336,9 @@ It's been obsolete since Emacs-22.1, actually.
** Calling 'lsh' now elicits a byte-compiler warning.
'lsh' behaves in somewhat surprising and platform-dependent ways for
negative arguments, and is generally slower than 'ash', which should be
-used instead.
+used instead. This warning can be suppressed by surrounding calls to
+'lsh' with the construct '(with-suppressed-warnings ((suspicious lsh)) ...)',
+but switching to `ash` is generally much preferable.
---
** Some functions and variables obsolete since Emacs 24 have been removed: