[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to avoid compiler warning `unused lexical variable' for `dolist'
From: |
Stefan Monnier |
Subject: |
Re: How to avoid compiler warning `unused lexical variable' for `dolist' or `dotimes'? |
Date: |
Fri, 08 Jan 2021 02:14:55 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> Only it is not relevant to macro or function that is documented to
> work, but then again it gives warnings for `n' and not for `return' as
> in above example.
Not sure what you mean by "documented", but `C-h f dotimes` says:
dotimes is a Lisp macro in ‘subr.el’.
(dotimes (VAR COUNT [RESULT]) BODY...)
Probably introduced at or before Emacs version 21.1.
Loop a certain number of times.
Evaluate BODY with VAR bound to successive integers running from 0,
inclusive, to COUNT, exclusive.
Finally RESULT is evaluated to get the return value (nil if
RESULT is omitted). Using RESULT is deprecated, and may result
in compilation warnings about unused variables.
Notice the last sentence.
Stefan
- Re: How to avoid compiler warning `unused lexical variable' for `dolist' or `dotimes'?, (continued)
- Re: How to avoid compiler warning `unused lexical variable' for `dolist' or `dotimes'?, Stefan Monnier, 2021/01/08
- Re: How to avoid compiler warning `unused lexical variable' for `dolist' or `dotimes'?, Robert Thorpe, 2021/01/08
- Re: How to avoid compiler warning `unused lexical variable' for `dolist' or `dotimes'?, Emanuel Berg, 2021/01/08
- Re: How to avoid compiler warning `unused lexical variable' for `dolist' or `dotimes'?, Stefan Monnier, 2021/01/08
- Re: How to avoid compiler warning `unused lexical variable' for `dolist' or `dotimes'?, Tomas Hlavaty, 2021/01/09
- Re: How to avoid compiler warning `unused lexical variable' for `dolist' or `dotimes'?, Stefan Monnier, 2021/01/09
- Re: How to avoid compiler warning `unused lexical variable' for `dolist' or `dotimes'?, Tomas Hlavaty, 2021/01/10
- Re: How to avoid compiler warning `unused lexical variable' for `dolist' or `dotimes'?, Stefan Monnier, 2021/01/10
- Re: How to avoid compiler warning `unused lexical variable' for `dolist' or `dotimes'?, Tomas Hlavaty, 2021/01/11
- Re: How to avoid compiler warning `unused lexical variable' for `dolist' or `dotimes'?, Jean Louis, 2021/01/08
- Re: How to avoid compiler warning `unused lexical variable' for `dolist' or `dotimes'?,
Stefan Monnier <=
- Re: How to avoid compiler warning `unused lexical variable' for `dolist' or `dotimes'?, Emanuel Berg, 2021/01/08
- Re: How to avoid compiler warning `unused lexical variable' for `dolist' or `dotimes'?, tomas, 2021/01/08
- Re: How to avoid compiler warning `unused lexical variable' for `dolist' or `dotimes'?, Emanuel Berg, 2021/01/08
- Re: How to avoid compiler warning `unused lexical variable' for `dolist' or `dotimes'?, tomas, 2021/01/08
- Re: How to avoid compiler warning `unused lexical variable' for `dolist' or `dotimes'?, Philipp Stephani, 2021/01/08
- Re: How to avoid compiler warning `unused lexical variable' for `dolist' or `dotimes'?, Emanuel Berg, 2021/01/08
- Re: How to avoid compiler warning `unused lexical variable' for `dolist' or `dotimes'?, Emanuel Berg, 2021/01/08
- Re: How to avoid compiler warning `unused lexical variable' for `dolist' or `dotimes'?, Philipp Stephani, 2021/01/08
- Re: How to avoid compiler warning `unused lexical variable' for `dolist' or `dotimes'?, Emanuel Berg, 2021/01/08
- Re: How to avoid compiler warning `unused lexical variable' for `dolist' or `dotimes'?, tomas, 2021/01/08