Commit 17589518 authored by Artur Malabarba's avatar Artur Malabarba

lisp/let-alist.el (let-alist): Evaluate `alist' only once.

parent f87eff57
2014-12-18 Artur Malabarba <bruce.connor.am@gmail.com>
* let-alist.el (let-alist): Evaluate the `alist' argument only
once.
2014-12-18 Sam Steingold <sds@gnu.org>
* emacs-lisp/package.el: Avoid compilation warning by declaring
......
......@@ -94,9 +94,11 @@ expands to
.body
.site))"
(declare (indent 1) (debug t))
`(let ,(mapcar (lambda (x) `(,(car x) (cdr (assq ',(cdr x) ,alist))))
(delete-dups (let-alist--deep-dot-search body)))
,@body))
(let ((var (gensym "let-alist")))
`(let ((,var ,alist)
(let ,(mapcar (lambda (x) `(,(car x) (cdr (assq ',(cdr x) ,var))))
(delete-dups (let-alist--deep-dot-search body)))
,@body)))))
(provide 'let-alist)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment