diff options
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | cider-interaction.el | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 89d6627a..993fbd9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ * [#949](https://github.com/clojure-emacs/cider/issues/949): New custom var: `cider-default-repl-command`. * New code formatting commands - `cider-format-buffer`, `cider-format-region` and `cider-format-defun`. * New data formatting commands - `cider-format-edn-buffer` and `cider-format-edn-region`. +* New insert region in REPL command - `cider-insert-region-in-repl`. * Pretty printing functionality moved to middleware, adding support for ClojureScript. - New command to eval and pprint result: `cider-interactive-pprint-eval`. - `cider-format-pprint-eval` has been removed. diff --git a/cider-interaction.el b/cider-interaction.el index 5e014fdd..9dc1cb83 100644 --- a/cider-interaction.el +++ b/cider-interaction.el @@ -1496,6 +1496,13 @@ If invoked with a prefix ARG eval the expression after inserting it." (interactive "P") (cider-insert-in-repl (cider-defun-at-point) arg)) +(defun cider-insert-region-in-repl (start end &optional arg) + "Insert the curent region in the REPL buffer. +If invoked with a prefix ARG eval the expression after inserting it." + (interactive "rP") + (cider-insert-in-repl + (buffer-substring-no-properties start end) arg)) + (defun cider-insert-ns-form-in-repl (&optional arg) "Insert the current buffer's ns form in the REPL buffer. If invoked with a prefix ARG eval the expression after inserting it." |