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

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

Re: How to avoid compiler warning `unused lexical variable' for `dolist'


From: Tomas Hlavaty
Subject: Re: How to avoid compiler warning `unused lexical variable' for `dolist' or `dotimes'?
Date: Mon, 11 Jan 2021 23:23:57 +0100

On Sun 10 Jan 2021 at 09:52, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> I see that Emacs Lisp does not have a way to distinguish the two cases.
>>
>> In Common Lisp, (declare (ignore i)) means ignore unused variable i.  If
>> i is used, I get a warning.
>
> ELisp's equivalent is to use a variable name with a leading underscore
> such as `_i` (or just `_`).

That's good to know, thank you!



reply via email to

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