summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/byte-run.el2
-rw-r--r--lisp/emacs-lisp/bytecomp.el4
2 files changed, 4 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index 5b415c5e1f4..a377ec395e1 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -658,7 +658,7 @@ in `byte-compile-warning-types'; see the variable
types. The types that can be suppressed with this macro are
`free-vars', `callargs', `redefine', `obsolete',
`interactive-only', `lexical', `ignored-return-value', `constants',
-`suspicious' and `empty-body'."
+`suspicious', `empty-body' and `mutate-constant'."
;; 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 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))