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


Message #26 received at 78704 <at> debbugs.gnu.org (full text, mbox):

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: Re: bug#78704: [PATCH] Use `seq-do' instead of `seq-map' for
 side-effects
Date: Tue, 10 Jun 2025 08:11:22 -0400
> While I realize that the Emacs Elisp code base might not be ideal
> (because most bugs that may have cropped up during development have
> presumably been fixex), it's what I've looked at so far; there are about
> 50 places I've changed locally to avoid the additional warnings, most of
> them harmless but a little confusing because of the unnecessary
> evaluation.

Thanks.  That kind of data is a good guide, IME.

> @@ -7600,7 +7600,7 @@ recover-session-finish
>  			       (condition-case nil
>  				   (save-excursion (recover-file file))
>  				 (error
> -				  "Failed to recover `%s'" file)))
> +				  (message "Failed to recover `%s'" file))))
>  			     files
>  			     '("file" "files" "recover"))
>  	    (message "No files can be recovered from this session now")))
>
> Is it right to use "message" here, which may be overwritten immediately
> by the next iteration of map-y-or-n-p?  Or we could do without a message
> in this case, as we have done for almost 30 years.

Better a message that gets hidden by a subsequent one than no message at
all, I think.

> I personally often ignore the byte compiler warnings because code I'm
> writing has unused arguments and variables, and those warnings drown out
> more serious ones.

Hmm... I was hoping that an underscore is a lightweight enough way to
indicate when a variable is unused to avoid being drowned in "unused
args" warnings.


        Stefan





This bug report was last modified 60 days ago.

Previous Next


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