Commit 22e37afd authored by Artur Malabarba's avatar Artur Malabarba
Browse files

lisp/let-alist.el (let-alist): Fix wrong parenthesis.

parent 777c8235
......@@ -70,7 +70,7 @@ symbol, and each cdr is the same symbol without the `.'."
(list (cons data (intern (replace-match "" nil nil name)))))))
((not (listp data)) nil)
(t (apply #'append
(remove nil (mapcar #'let-alist--deep-dot-search data))))))
(mapcar #'let-alist--deep-dot-search data)))))
;;;###autoload
(defmacro let-alist (alist &rest body)
......@@ -95,10 +95,10 @@ expands to
.site))"
(declare (indent 1) (debug t))
(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)))))
`(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