Variable: byte-compile-warnings

byte-compile-warnings is a customizable variable defined in bytecomp.el.gz.

Value

t

Documentation

List of warnings that the byte-compiler should issue (t for almost all).

Elements of the list may be:

  callargs function calls with args that don't match the definition.
  constants let-binding of, or assignment to, constants/nonvariables.
  docstrings various docstring stylistic issues, such as incorrect use
              of single quotes
  docstrings-non-ascii-quotes
              docstrings that have non-ASCII quotes.
              Only enabled when docstrings also is.
  docstrings-wide
              docstrings that are too wide, containing lines longer than both
              byte-compile-docstring-max-column and fill-column characters.
              Only enabled when docstrings also is.
  docstrings-control-chars
              docstrings that contain control characters other than NL and TAB
  empty-body body argument to a special form or macro is empty.
  free-vars references to variables not in the current lexical scope.
  ignored-return-value
              function called without using the return value where this
              is likely to be a mistake.
  interactive-only
commands that normally shouldn't be called from Lisp code.
  lexical global/dynamic variables lacking a prefix.
  lexical-dynamic
              lexically bound variable declared dynamic elsewhere
  make-local calls to make-variable-buffer-local that may be incorrect.
  mutate-constant
              code that mutates program constants such as quoted lists.
  noruntime functions that may not be defined at runtime (typically
              defined only under eval-when-compile).
  not-unused warning about using variables with symbol names starting with _.
  obsolete obsolete variables and functions.
  redefine function name redefined from a macro to ordinary function or vice
              versa, or redefined to take a different number of arguments.
  suspicious constructs that usually don't do what the coder wanted.
  unresolved calls to unknown functions.

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.

The t value means "all non experimental warning types", and excludes the types in byte-compile--emacs-build-warning-types. A value of all really means all.

Probably introduced at or before Emacs version 23.1.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/bytecomp.el.gz
(defcustom byte-compile-warnings t
  "List of warnings that the byte-compiler should issue (t for almost all).

Elements of the list may be:

  callargs    function calls with args that don't match the definition.
  constants   let-binding of, or assignment to, constants/nonvariables.
  docstrings  various docstring stylistic issues, such as incorrect use
              of single quotes
  docstrings-non-ascii-quotes
              docstrings that have non-ASCII quotes.
              Only enabled when `docstrings' also is.
  docstrings-wide
              docstrings that are too wide, containing lines longer than both
              `byte-compile-docstring-max-column' and `fill-column' characters.
              Only enabled when `docstrings' also is.
  docstrings-control-chars
              docstrings that contain control characters other than NL and TAB
  empty-body  body argument to a special form or macro is empty.
  free-vars   references to variables not in the current lexical scope.
  ignored-return-value
              function called without using the return value where this
              is likely to be a mistake.
  interactive-only
	      commands that normally shouldn't be called from Lisp code.
  lexical     global/dynamic variables lacking a prefix.
  lexical-dynamic
              lexically bound variable declared dynamic elsewhere
  make-local  calls to `make-variable-buffer-local' that may be incorrect.
  mutate-constant
              code that mutates program constants such as quoted lists.
  noruntime   functions that may not be defined at runtime (typically
              defined only under `eval-when-compile').
  not-unused  warning about using variables with symbol names starting with _.
  obsolete    obsolete variables and functions.
  redefine    function name redefined from a macro to ordinary function or vice
              versa, or redefined to take a different number of arguments.
  suspicious  constructs that usually don't do what the coder wanted.
  unresolved  calls to unknown functions.

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.

The t value means \"all non experimental warning types\", and
excludes the types in `byte-compile--emacs-build-warning-types'.
A value of `all' really means all."
  :type `(choice (const :tag "Default selection" t)
                 (const :tag "All" all)
		 (set :menu-tag "Some"
                      ,@(mapcar (lambda (x) `(const ,x))
                                byte-compile-warning-types))))