Symbols with destructuring expansions are not vars

* dash.el (dash--match): Don't bind symbols with expansion functions
as if they were variables.

Fixes #395.
master
Basil L. Contovounesios 4 years ago
parent 7fd71338dc
commit c860155810
No known key found for this signature in database
GPG Key ID: 205AB54A5D5D8CFF
  1. 4
      dash.el

@ -2214,7 +2214,9 @@ matchers based on the type of the expression.
Key-value stores are disambiguated by placing a token &plist, Key-value stores are disambiguated by placing a token &plist,
&alist or &hash as a first item in the MATCH-FORM." &alist or &hash as a first item in the MATCH-FORM."
(cond (cond
((symbolp match-form) ((and (symbolp match-form)
;; Don't bind things like &keys as if they were vars (#395).
(not (functionp (dash--get-expand-function match-form))))
(dash--match-symbol match-form source)) (dash--match-symbol match-form source))
((consp match-form) ((consp match-form)
(cond (cond

Loading…
Cancel
Save