emacs-devel
[Top][All Lists]
Advanced

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

Re: Two binding features


From: Paul R
Subject: Re: Two binding features
Date: Thu, 08 May 2008 00:15:27 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

address@hidden (Johan Bockgård) writes:

> Richard M Stallman <address@hidden> writes:
>
>> * A primitive that would let-bind variables from an alist.
>> I think Common Lisp has such a construct; is that correct?
>> I do not recall its name, though.
>
>   progv is a Lisp macro in `cl-macs.el'.
>
>   (progv SYMBOLS VALUES &rest BODY)
>
>   Bind SYMBOLS to VALUES dynamically in BODY.
>   The forms SYMBOLS and VALUES are evaluated, and must evaluate to lists.
>   Each symbol in the first list is bound to the corresponding value in the
>   second list (or made unbound if VALUES is shorter than SYMBOLS); then
>   the
>   BODY forms are executed and their result is returned.  This is much like
>   a `let' form, except that the list of symbols can be computed at
>   run-time.

destructuring-bind is also a lisp macro in cl-macs.el. No docstring in
my install. It works pretty much the same, but generalized to any
structure for symbols and values.
Also, I feel org-mode implemented exactly what Richard said, I'll dig
it a bit more and report later.

-- 
      Paul




reply via email to

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