On Sun, Apr 3, 2011 at 14:05, Christian Ohler<address@hidden> wrote:
In loop destructuring, you can use nil for fields that you want to ignore:
(loop for (nil width . nil) in bs-attributes-list
if (numberp width) sum width)
Yes, but it is less informative.
If you want to keep the ignored fields named, you could do something like
(loop for (name width . rest) in bs-attributes-list
do (progn name rest) ; ignore
if (numberp width) sum width)
And this is just ugly.
Anyway, the point is that (elisp)11.9.5.1 "Converting a package to use
lexical scoping" says:
To silence byte-compiler warnings about unused variables, just use a
variable name that start with an underscore, which the byte-compiler
interpret as an indication that this is a variable known not to be used.
but this exception is quite less useful if assignments produce the
"variable `_x' not left unused" warning.