summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/bytecomp.el
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2023-05-13 13:49:07 +0200
committerMattias EngdegÄrd <mattiase@acm.org>2023-05-13 14:30:59 +0200
commit9f856e4cd095c24cf4e6cadbc04efaf533e59f37 (patch)
treee12e307dddab95b24fc8ad2de68b244ea5b0be71 /lisp/emacs-lisp/bytecomp.el
parentc083fa5cf80f711ac43dca1b6582aff1ad526e8e (diff)
downloademacs-9f856e4cd095c24cf4e6cadbc04efaf533e59f37.tar.gz
Use `mutate-constant` as warning identifier
* etc/NEWS: * lisp/emacs-lisp/byte-run.el (with-suppressed-warnings): * lisp/emacs-lisp/bytecomp.el (byte-compile-warnings) (byte-compile-form): * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-test--with-suppressed-warnings): Use the new warning name `mutate-constant` instead of using the somewhat overloaded `suspicious`.
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
-rw-r--r--lisp/emacs-lisp/bytecomp.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index d17f1c93a76..a192d599d1d 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -330,6 +330,8 @@ Elements of the list may be:
This depends on the `docstrings' warning type.
suspicious constructs that usually don't do what the coder wanted.
empty-body body argument to a special form or macro is empty.
+ mutate-constant
+ code that mutates program constants such as quoted lists
If the list begins with `not', then the remaining elements specify warnings to
suppress. For example, (not free-vars) will suppress the `free-vars' warning.
@@ -3498,7 +3500,7 @@ lambda-expression."
(consp (nth 1 arg)))
(arrayp arg))
(byte-compile-warning-enabled-p
- 'suspicious (car form)))
+ 'mutate-constant (car form)))
(byte-compile-warn-x form "`%s' on constant %s (arg %d)"
(car form)
(if (consp arg) "list" (type-of arg))