|
From: | Andreas Röhler |
Subject: | Re: Compiler warning |
Date: | Wed, 18 Jul 2018 14:05:24 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 18.07.2018 13:48, Noam Postavsky wrote:
On 18 July 2018 at 07:38, Andreas Röhler <andreas.roehler@easy-emacs.de> wrote:get a strange Warning: Unused lexical variable ‘i’ refering to this: (defun py-forward-block (&optional arg decorator bol) "[...]" (interactive "p") (let (erg) (dotimes (i (or arg 1)) (let ((orig (point))) (setq erg (py--end-base 'py-block-re orig decorator bol))))You haven't use `i', so the warning seems fitting. Use `_' instead of `i' to tell the compiler the variable is ignored on purpose.
Thanks.
While code below compiles without warning: (defun foo (&optional arg) (interactive "p") (dotimes (i (or arg 1)) (insert "Me again\n")))Did you compile this one without lexical-binding?
Ehm, yes. Okay, thanks!
[Prev in Thread] | Current Thread | [Next in Thread] |