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

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

Re: dotimes var comiler warning


From: Andreas Röhler
Subject: Re: dotimes var comiler warning
Date: Thu, 24 Nov 2016 14:59:14 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Icedove/45.4.0



On 24.11.2016 13:53, Joost Kremers wrote:

On Thu, Nov 24 2016, Andreas Röhler wrote:
when employing a form

(dotimes (i erg)

    ...do-something


Compiler sends a warning "Unused lexical variable ‘i’ - whilst seems no way to leave out such a var.

This seems to work:

   (dotimes (_ erg)
     ...)

(info "(elisp) Using Lexical Binding") says:

,----
| (To silence byte-compiler warnings about unused variables, just use a
| variable name that start with an underscore.  The byte-compiler
| interprets this as an indication that this is a variable known not to be
| used.)
`----

(Very bottom of the page)

HTH



Thanks!




reply via email to

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