Skip to content

Commit bd051f2

Browse files
xiongtxbbatsov
authored andcommitted
Remove single tuple bindings for {if, when}-let*
In Emacs 26, `{if, when}-let*` do not allow single tuple bindings.
1 parent 3a98c1b commit bd051f2

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

cider-compat.el

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,9 @@ threading."
130130
"Process BINDINGS and if all values are non-nil eval THEN, else ELSE.
131131
Argument BINDINGS is a list of tuples whose car is a symbol to be
132132
bound and (optionally) used in THEN, and its cadr is a sexp to be
133-
evalled to set symbol's value. In the special case you only want
134-
to bind a single value, BINDINGS can just be a plain tuple."
133+
evalled to set symbol's value."
135134
(declare (indent 2)
136135
(debug ([&or (&rest (symbolp form)) (symbolp form)] form body)))
137-
(when (and (<= (length bindings) 2)
138-
(not (listp (car bindings))))
139-
;; Adjust the single binding case
140-
(setq bindings (list bindings)))
141136
`(let* ,(internal--build-bindings bindings)
142137
(if ,(car (internal--listify (car (last bindings))))
143138
,then
@@ -148,8 +143,7 @@ to bind a single value, BINDINGS can just be a plain tuple."
148143
"Process BINDINGS and if all values are non-nil eval BODY.
149144
Argument BINDINGS is a list of tuples whose car is a symbol to be
150145
bound and (optionally) used in BODY, and its cadr is a sexp to be
151-
evalled to set symbol's value. In the special case you only want
152-
to bind a single value, BINDINGS can just be a plain tuple."
146+
evalled to set symbol's value."
153147
(declare (indent 1) (debug if-let*))
154148
`(if-let* ,bindings ,(macroexp-progn body)))))
155149

0 commit comments

Comments
 (0)