From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Christopher Wellons <wellons@nullprogram.com>,
31641@debbugs.gnu.org, Noam Postavsky <npostavs@gmail.com>,
Stefan Monnier <monnier@iro.umontreal.ca>
Subject: bug#31641: 26.1; iter-do variable not left unused warning
Date: Fri, 05 Feb 2021 17:12:15 +0000 [thread overview]
Message-ID: <87mtwi8mmo.fsf@tcd.ie> (raw)
In-Reply-To: <87czxgtafv.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 04 Feb 2021 11:05:24 +0100")
Lars Ingebrigtsen <larsi@gnus.org> writes:
> diff --git a/lisp/emacs-lisp/generator.el b/lisp/emacs-lisp/generator.el
> index 9eb6d95964..0b644cc72c 100644
> --- a/lisp/emacs-lisp/generator.el
> +++ b/lisp/emacs-lisp/generator.el
> @@ -731,7 +731,10 @@ iter-do
> (,it-symbol ,iterator))
> (while (not ,done-symbol)
> (condition-case ,condition-symbol
> - (setf ,var (iter-next ,it-symbol))
> + ;; Variables that start with an underscore shouldn't be set.
> + ,(if (string-match-p "\\`_" (symbol-name var))
> + nil
> + `(setf ,var (iter-next ,it-symbol)))
Nit - AKA the following?
,(unless (string-prefix-p "_" (symbol-name var))
`(setf ,var (iter-next ,it-symbol)))
--
Basil
prev parent reply other threads:[~2021-02-05 17:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-29 13:12 bug#31641: 26.1; iter-do variable not left unused warning Christopher Wellons
2018-05-29 22:13 ` Noam Postavsky
2021-02-04 10:05 ` Lars Ingebrigtsen
2021-02-04 16:36 ` Stefan Monnier
2021-02-05 8:53 ` Lars Ingebrigtsen
2021-02-05 15:03 ` Stefan Monnier
2021-02-06 10:31 ` Lars Ingebrigtsen
2021-02-05 17:12 ` Basil L. Contovounesios [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mtwi8mmo.fsf@tcd.ie \
--to=contovob@tcd.ie \
--cc=31641@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=monnier@iro.umontreal.ca \
--cc=npostavs@gmail.com \
--cc=wellons@nullprogram.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).