File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 36
36
* Rebind ` cider-eval-region ` to ` C-c C-v r ` .
37
37
* Rebind ` cider-eval-ns-form ` to ` C-c C-v n ` .
38
38
* [ #1577 ] ( https://github.com/clojure-emacs/cider/issues/1577 ) : Show first line of docstring in ns browser.
39
+ * ` cider-repl-closing-return ` (` C-<Return> ` ) now also completes brackets (` [] ` ) and curly braces (` {} ` ) in an expression.
39
40
40
41
### Bugs fixed
41
42
Original file line number Diff line number Diff line change @@ -760,13 +760,16 @@ text property `cider-old-input'."
760
760
(forward-char offset))))
761
761
762
762
(defun cider-repl-closing-return ()
763
- " Evaluate the current input string after closing all open lists ."
763
+ " Evaluate the current input string after closing all open parenthesized or bracketed expressions ."
764
764
(interactive )
765
765
(goto-char (point-max ))
766
766
(save-restriction
767
767
(narrow-to-region cider-repl-input-start-mark (point ))
768
- (while (ignore-errors (save-excursion (backward-up-list 1 )) t )
769
- (insert " )" )))
768
+ (let ((matching-delimiter nil ))
769
+ (while (ignore-errors (save-excursion
770
+ (backward-up-list 1 )
771
+ (setq matching-delimiter (cdr (syntax-after (point ))))) t )
772
+ (insert-char matching-delimiter))))
770
773
(cider-repl-return))
771
774
772
775
(defun cider-repl-toggle-pretty-printing ()
You can’t perform that action at this time.
0 commit comments