From c860155810791e08036de9898463680314253de8 Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Mon, 16 May 2022 20:33:35 +0300 Subject: [PATCH] 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. --- dash.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dash.el b/dash.el index 26e1f8b..927f962 100644 --- a/dash.el +++ b/dash.el @@ -2214,7 +2214,9 @@ matchers based on the type of the expression. Key-value stores are disambiguated by placing a token &plist, &alist or &hash as a first item in the MATCH-FORM." (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)) ((consp match-form) (cond