bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#31641: 26.1; iter-do variable not left unused warning


From: Christopher Wellons
Subject: bug#31641: 26.1; iter-do variable not left unused warning
Date: Tue, 29 May 2018 09:12:30 -0400
User-agent: NeoMutt/20170113 (1.7.2)

When byte-compiling an iter-do form with a variable intended to be left unused, the compiler emits a false warning:

;;; -*- lexical-binding: t; -*-
(require 'generator)
(iter-do (_ i))
;; -> "Warning: variable ā€˜_ā€™ not left unused"

Giving the variable a name has the opposite effect, though it's not a false warning in this case:

(iter-do (v i))
;; -> "Unused lexical variable ā€˜vā€™"

This issue does not occur with similar, long-established forms:

;;; -*- lexical-binding: t; -*-
(dolist (_ '(a b c)))
(dotimes (_ 10))
;; -> no warnings





reply via email to

[Prev in Thread] Current Thread [Next in Thread]