emacs/lisp/emacs-lisp
Mattias Engdegård aef996cd34 Consolidate existing warnings about unused return values
Move the warning about unused return values from calls to
side-effect-free functions from the source-level optimiser to the code
generator, where it can be unified with the special-purpose warning
about unused values from `mapcar`.  This change also cures spurious
duplicate warnings about the same code, makes the warnings amenable to
suppression through `with-suppressed-warnings`, and now warns about
some unused values that weren't caught before.

* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
Move warning away from here.
* lisp/emacs-lisp/byte-run.el (with-suppressed-warnings):
* lisp/emacs-lisp/bytecomp.el (byte-compile-warnings):
Doc string updates.
(byte-compile-form): Put the new warnings here.
(byte-compile-normal-call): Move mapcar warning away from here.
* lisp/emacs-lisp/bytecomp.el (byte-compile-ignore):
Compile args to `ignore` for value to avoid unused-value warnings, and
then discard the generated values immediately thereafter.  Mostly this
does not affect the generated code but in rare cases it might result
in slightly worse code.
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-test--with-suppressed-warnings): Adapt test.
2023-04-08 19:34:30 +02:00
..
advice.el Fix an oversight in advice.el 2023-01-19 22:13:25 +02:00
avl-tree.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
backquote.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
backtrace.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
benchmark.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
bindat.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
byte-opt.el Consolidate existing warnings about unused return values 2023-04-08 19:34:30 +02:00
byte-run.el Consolidate existing warnings about unused return values 2023-04-08 19:34:30 +02:00
bytecomp.el Consolidate existing warnings about unused return values 2023-04-08 19:34:30 +02:00
cconv.el Don't modify interactive closures destructively (Bug#60974). 2023-03-06 20:28:20 +05:30
chart.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
check-declare.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
checkdoc.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
cl-extra.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
cl-generic.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
cl-indent.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
cl-lib.el Data argument to signal should be a list 2023-01-03 14:03:58 +01:00
cl-macs.el Avoid unwind-protect without unwind forms in cl-letf 2023-03-29 19:47:03 +02:00
cl-preloaded.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
cl-print.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
cl-seq.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
comp-cstr.el ; Fix typo 2023-02-18 13:39:28 +01:00
comp.el Comp: Fix limplification pass (bug#62537) 2023-04-05 19:12:42 +02:00
copyright.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
crm.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
cursor-sensor.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
debug-early.el * lisp/emacs-lisp/debug-early.el (debug-early-backtrace): Fix bug#61847 2023-03-01 12:31:09 -05:00
debug.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
derived.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
disass.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
easy-mmode.el Merge commit '1bc9dfc5bee' 2023-03-27 17:14:27 -04:00
easymenu.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
edebug.el Remove useless unwind-protect forms, or make them useful as intended 2023-04-07 19:08:33 +02:00
eieio-base.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
eieio-core.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
eieio-custom.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
eieio-datadebug.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
eieio-opt.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
eieio-speedbar.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
eieio.el Styled quotes in compiler warnings 2023-01-03 18:39:06 +01:00
eldoc.el Eldoc: bump package version to 1.14.0 2023-04-02 23:40:46 +01:00
elint.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
elp.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
ert-x.el ; Fix typo in ert-with-temp-file 2023-01-13 02:50:39 +01:00
ert.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
ewoc.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
faceup.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
find-func.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
float-sup.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
generate-lisp-file.el * Fix previous change 2023-02-13 17:07:25 +01:00
generator.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
generic.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
gv.el Merge from origin/emacs-29 2023-03-27 17:16:58 -04:00
helper.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
hierarchy.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
icons.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
inline.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
let-alist.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
lisp-mnt.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
lisp-mode.el lisp-mode: add docstring recognition for more common lisp symbols 2023-02-09 16:09:28 +02:00
lisp.el Move side-effect-free and pure declarations to function definitions 2023-02-17 14:52:54 +01:00
loaddefs-gen.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
macroexp.el Warn about unwind-protect without unwind forms 2023-03-29 19:47:03 +02:00
map-ynp.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
map.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
memory-report.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
multisession.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
nadvice.el nadvice: Fix bug#61179 2023-02-04 11:23:31 -05:00
oclosure.el nadvice: Fix bug#61179 2023-02-04 11:23:31 -05:00
package-vc.el Merge from origin/emacs-29 2023-04-03 00:33:03 +01:00
package-x.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
package.el Remove useless unwind-protect forms, or make them useful as intended 2023-04-07 19:08:33 +02:00
pcase.el Styled quotes in compiler warnings 2023-01-03 18:39:06 +01:00
pp.el Fix minor issues with 'pp' and related commands 2023-01-13 10:39:58 +02:00
radix-tree.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
range.el ; * lisp/emacs-lisp/range.el: Fix some typos 2023-01-28 17:30:42 +01:00
re-builder.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
regexp-opt.el Move side-effect-free and pure declarations to function definitions 2023-02-17 14:52:54 +01:00
regi.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
ring.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
rmc.el Fix invocation of File->Close from the menu bar 2023-02-19 11:29:32 +02:00
rx.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
seq.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
shadow.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
shortdoc.el Fix pluralization in shortdoc-help-fns-examples-function 2023-03-12 15:22:38 +02:00
shorthands.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
smie.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
subr-x.el Add some pure and side-effect-free declarations 2023-02-15 12:04:13 +01:00
syntax.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
tabulated-list.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
tcover-ses.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
testcover.el Don't rely on dynamic scoping to fix bug#59213 2023-02-18 12:56:24 -05:00
text-property-search.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
thunk.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
timer-list.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
timer.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
tq.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
trace.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
unsafep.el Fix unsafep for aliases to side-effect-free functions 2023-02-24 16:53:32 +01:00
vtable.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
warnings.el Fix display of warnings on w32 console 2023-01-17 15:44:51 +02:00