diff options
author | Tianxiang Xiong <tianxiang.xiong@gmail.com> | 2017-12-12 19:19:37 -0800 |
---|---|---|
committer | Bozhidar Batsov <bozhidar.batsov@gmail.com> | 2017-12-13 08:26:56 +0000 |
commit | bd051f2f2abf15d6f02f53d3452a79644e30538e (patch) | |
tree | 26fd5b5094d6e2e2071b7f30fa26e87b6107eb0c | |
parent | 3a98c1b9f931961132137a54e98d1ea03f0e6006 (diff) |
Remove single tuple bindings for `{if, when}-let*`
In Emacs 26, `{if, when}-let*` do not allow single tuple bindings.
-rw-r--r-- | cider-compat.el | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/cider-compat.el b/cider-compat.el index 4debff12..816b8635 100644 --- a/cider-compat.el +++ b/cider-compat.el @@ -130,14 +130,9 @@ threading." "Process BINDINGS and if all values are non-nil eval THEN, else ELSE. Argument BINDINGS is a list of tuples whose car is a symbol to be bound and (optionally) used in THEN, and its cadr is a sexp to be -evalled to set symbol's value. In the special case you only want -to bind a single value, BINDINGS can just be a plain tuple." +evalled to set symbol's value." (declare (indent 2) (debug ([&or (&rest (symbolp form)) (symbolp form)] form body))) - (when (and (<= (length bindings) 2) - (not (listp (car bindings)))) - ;; Adjust the single binding case - (setq bindings (list bindings))) `(let* ,(internal--build-bindings bindings) (if ,(car (internal--listify (car (last bindings)))) ,then @@ -148,8 +143,7 @@ to bind a single value, BINDINGS can just be a plain tuple." "Process BINDINGS and if all values are non-nil eval BODY. Argument BINDINGS is a list of tuples whose car is a symbol to be bound and (optionally) used in BODY, and its cadr is a sexp to be -evalled to set symbol's value. In the special case you only want -to bind a single value, BINDINGS can just be a plain tuple." +evalled to set symbol's value." (declare (indent 1) (debug if-let*)) `(if-let* ,bindings ,(macroexp-progn body))))) |