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

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

bug#16206: 24.3; Incorrect unused variable byte-compiler warning in doti


From: Christopher Wellons
Subject: bug#16206: 24.3; Incorrect unused variable byte-compiler warning in dotimes
Date: Fri, 20 Dec 2013 16:06:38 -0500
User-agent: Notmuch/0.16+156~gdb5189a (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu)

When `lexical-binding' is t the byte-compiler issues an invalid warning
for `dotimes' when the optional "result" form is used. For example,
byte-compile a file with these contents.

    ;;; -*- lexical-binding: t; -*-
    (defun foo ()
      (dotimes (i 1 t) i))

Or evaluate this form.

    (let ((lexical-binding t))
      (byte-compile (lambda () (dotimes (i 1 t) i))))

Output:

    Warning: Unused lexical variable `i'

If the t is removed the warning goes away.





reply via email to

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