GNU bug report logs - #78704
[PATCH] Use `seq-do' instead of `seq-map' for side-effects

Previous Next

Package: emacs;

Reported by: Zach Shaftel <zach <at> shaf.tel>

Date: Fri, 6 Jun 2025 03:19:01 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Pip Cet <pipcet <at> protonmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 78704 <at> debbugs.gnu.org, Nicolas Petton <nicolas <at> petton.fr>, Zach Shaftel <zach <at> shaf.tel>
Subject: bug#78704: [PATCH] Use `seq-do' instead of `seq-map' for side-effects
Date: Mon, 09 Jun 2025 10:25:38 -0400
> I believe it was, but it seems we never complained about discarding,
> for example, (not (beep)), even though the "not" is superfluous.

FWIW, we don't care about warning for all such cases.  Instead we want
to care about those cases that often enough reflect errors.

Warnings are always delicate in practice because "pointless" code can
show up very naturally from perfectly good code, just as the result of
rewrites like inlining and macro-expansion.  So it's not always
desirable to be "more thorough" especially when the warning is about
code that is not optimized enough (as opposed to dubious/invalid code)
because you can end up with too many false positives.


        Stefan





This bug report was last modified 8 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.