[Top][All Lists]

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

Re: Lexical binding

From: Juanma Barranquero
Subject: Re: Lexical binding
Date: Sat, 2 Apr 2011 20:57:30 +0200

On Sat, Apr 2, 2011 at 20:50, Juanma Barranquero <address@hidden> wrote:

> OK, perhaps I simplified too much. The original problem is in this
> function from help-fns.el:

Forget the previous message, which is about `dolist'. I mixed my examples.

The original trouble with `loop' is that, in a loop like this one,
with destructuring

 (defsubst my--bs-file-width ()
   (- (window-width)
     (loop for (name width . rest) in bs-attributes-list
         if (numberp width) sum width)

`name' is just a placeholder (as it is rest). I'm interested just in
`width'. And there's no way to write that loop as is without warnings.
Interestingly, `rest' does not produce a warning.

I suppose I can rework the loop to avoid the restructuring, but it
seems like a loss of clarity.


reply via email to

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