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 3636* Rebind ` cider-eval-region ` to ` C-c C-v r ` .
3737* Rebind ` cider-eval-ns-form ` to ` C-c C-v n ` .
3838* [ #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.
3940
4041### Bugs fixed
4142
Original file line number Diff line number Diff line change @@ -760,13 +760,16 @@ text property `cider-old-input'."
760760 (forward-char offset))))
761761
762762(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 ."
764764 (interactive )
765765 (goto-char (point-max ))
766766 (save-restriction
767767 (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))))
770773 (cider-repl-return))
771774
772775(defun cider-repl-toggle-pretty-printing ()
You can’t perform that action at this time.
0 commit comments