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

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

bug#25017: Fwd: Re: dotimes var comiler warning


From: Michael Albinus
Subject: bug#25017: Fwd: Re: dotimes var comiler warning
Date: Thu, 24 Nov 2016 15:44:04 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Andreas Röhler <andreas.roehler@easy-emacs.de> writes:

>> (dotimes (i erg)
>>
>>    ...do-something
>>
>> Compiler sends a warning "Unused lexical variable ‘i’ - whilst seems
>> no way to leave out such a var.
>
> Yes, you can probably use `_' to suppress the warning, but I always
> wondered why something called like this requires a variable to be
> specified (mandatorily) at all.

Why is this a problem? We have the same situation with function
arguments. If you have an unused argument, you do the same:

(defun my-fun (_unused used)
  ;; code w/o _unused
  )

> Michael.

Best regards, Michael.





reply via email to

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