aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias EngdegÄrd2023-10-13 19:55:45 +0200
committerMattias EngdegÄrd2023-10-14 10:34:10 +0200
commit548bc3e3d18ea6776032ca83dafbc89e3ddb5a5a (patch)
tree97f54e8d77a07328925c8eb559d65a903807125e
parent115a940a4b1d28f18df5aa82a19fae9cbe67b869 (diff)
downloademacs-548bc3e3d18ea6776032ca83dafbc89e3ddb5a5a.tar.gz
emacs-548bc3e3d18ea6776032ca83dafbc89e3ddb5a5a.zip
Sort byte compiler warnings in alphabetic order
* lisp/emacs-lisp/bytecomp.el (byte-compile-warning-types): Rearrange. Add a few missing ones.
-rw-r--r--lisp/emacs-lisp/bytecomp.el56
1 files changed, 29 insertions, 27 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 5ce053c0d6e..b3ddc7dd208 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -292,49 +292,51 @@ The information is logged to `byte-compile-log-buffer'."
292;;;###autoload(put 'byte-compile-error-on-warn 'safe-local-variable 'booleanp) 292;;;###autoload(put 'byte-compile-error-on-warn 'safe-local-variable 'booleanp)
293 293
294(defconst byte-compile-warning-types 294(defconst byte-compile-warning-types
295 '(redefine callargs free-vars unresolved 295 '( callargs constants
296 obsolete noruntime interactive-only 296 docstrings docstrings-non-ascii-quotes docstrings-wide
297 make-local mapcar constants suspicious lexical lexical-dynamic 297 empty-body free-vars ignored-return-value interactive-only
298 docstrings docstrings-wide docstrings-non-ascii-quotes not-unused 298 lexical lexical-dynamic make-local
299 empty-body) 299 mapcar ; obsolete
300 mutate-constant noruntime not-unused obsolete redefine suspicious
301 unresolved)
300 "The list of warning types used when `byte-compile-warnings' is t.") 302 "The list of warning types used when `byte-compile-warnings' is t.")
301(defcustom byte-compile-warnings t 303(defcustom byte-compile-warnings t
302 "List of warnings that the byte-compiler should issue (t for almost all). 304 "List of warnings that the byte-compiler should issue (t for almost all).
303 305
304Elements of the list may be: 306Elements of the list may be:
305 307
306 free-vars references to variables not in the current lexical scope.
307 unresolved calls to unknown functions.
308 callargs function calls with args that don't match the definition. 308 callargs function calls with args that don't match the definition.
309 redefine function name redefined from a macro to ordinary function or vice
310 versa, or redefined to take a different number of arguments.
311 obsolete obsolete variables and functions.
312 noruntime functions that may not be defined at runtime (typically
313 defined only under `eval-when-compile').
314 interactive-only
315 commands that normally shouldn't be called from Lisp code.
316 lexical global/dynamic variables lacking a prefix.
317 lexical-dynamic
318 lexically bound variable declared dynamic elsewhere
319 make-local calls to `make-variable-buffer-local' that may be incorrect.
320 ignored-return-value
321 function called without using the return value where this
322 is likely to be a mistake
323 not-unused warning about using variables with symbol names starting with _.
324 constants let-binding of, or assignment to, constants/nonvariables. 309 constants let-binding of, or assignment to, constants/nonvariables.
325 docstrings various docstring stylistic issues, such as incorrect use 310 docstrings various docstring stylistic issues, such as incorrect use
326 of single quotes 311 of single quotes
312 docstrings-non-ascii-quotes
313 docstrings that have non-ASCII quotes.
314 Only enabled when `docstrings' also is.
327 docstrings-wide 315 docstrings-wide
328 docstrings that are too wide, containing lines longer than both 316 docstrings that are too wide, containing lines longer than both
329 `byte-compile-docstring-max-column' and `fill-column' characters. 317 `byte-compile-docstring-max-column' and `fill-column' characters.
330 Only enabled when `docstrings' also is. 318 Only enabled when `docstrings' also is.
331 docstrings-non-ascii-quotes
332 docstrings that have non-ASCII quotes.
333 Only enabled when `docstrings' also is.
334 suspicious constructs that usually don't do what the coder wanted.
335 empty-body body argument to a special form or macro is empty. 319 empty-body body argument to a special form or macro is empty.
320 free-vars references to variables not in the current lexical scope.
321 ignored-return-value
322 function called without using the return value where this
323 is likely to be a mistake.
324 interactive-only
325 commands that normally shouldn't be called from Lisp code.
326 lexical global/dynamic variables lacking a prefix.
327 lexical-dynamic
328 lexically bound variable declared dynamic elsewhere
329 make-local calls to `make-variable-buffer-local' that may be incorrect.
336 mutate-constant 330 mutate-constant
337 code that mutates program constants such as quoted lists 331 code that mutates program constants such as quoted lists.
332 noruntime functions that may not be defined at runtime (typically
333 defined only under `eval-when-compile').
334 not-unused warning about using variables with symbol names starting with _.
335 obsolete obsolete variables and functions.
336 redefine function name redefined from a macro to ordinary function or vice
337 versa, or redefined to take a different number of arguments.
338 suspicious constructs that usually don't do what the coder wanted.
339 unresolved calls to unknown functions.
338 340
339If the list begins with `not', then the remaining elements specify warnings to 341If the list begins with `not', then the remaining elements specify warnings to
340suppress. For example, (not free-vars) will suppress the `free-vars' warning. 342suppress. For example, (not free-vars) will suppress the `free-vars' warning.