From 071cfb2128b261aa9f20e5ce8fc3ec2d21ffd4e1 Mon Sep 17 00:00:00 2001 From: Suvrat Apte Date: Thu, 27 Feb 2020 12:13:11 +0530 Subject: [PATCH] [Fix #2617] Add an entry in cider-mode-eval-menu for `insert and eval in REPL` (#2810) --- CHANGELOG.md | 4 ++++ cider-mode.el | 2 ++ doc/modules/ROOT/pages/usage/cider_mode.adoc | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ffa946852..32c332ef2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## master (unreleased) +### Changes + +* [#2617](https://github.com/clojure-emacs/cider/pull/2617): Add menu bar entry for `Insert last sexp in REPL and eval` under `CIDER Eval`. + ### Bugs fixed * [#2807](https://github.com/clojure-emacs/cider/pull/2807): Fix require-repl-utils for shadow-cljs repls diff --git a/cider-mode.el b/cider-mode.el index 59bc6f99c..07da3fd8a 100644 --- a/cider-mode.el +++ b/cider-mode.el @@ -360,6 +360,8 @@ If invoked with a prefix ARG eval the expression after inserting it." ["Interrupt evaluation" cider-interrupt] "--" ["Insert last sexp in REPL" cider-insert-last-sexp-in-repl] + ["Insert last sexp in REPL and eval" (cider-insert-last-sexp-in-repl t) + :keys "\\[universal-argument] \\[cider-insert-last-sexp-in-repl]"] ["Insert top-level sexp in REPL" cider-insert-defun-in-repl] ["Insert region in REPL" cider-insert-region-in-repl] ["Insert ns form in REPL" cider-insert-ns-form-in-repl] diff --git a/doc/modules/ROOT/pages/usage/cider_mode.adoc b/doc/modules/ROOT/pages/usage/cider_mode.adoc index 3f7b34600..fd16ab5d5 100644 --- a/doc/modules/ROOT/pages/usage/cider_mode.adoc +++ b/doc/modules/ROOT/pages/usage/cider_mode.adoc @@ -61,6 +61,10 @@ kbd:[C-c C-e] | kbd:[C-c M-p] | Load the form preceding point in the REPL buffer. +| `cider-insert-last-sexp-in-repl` +| kbd:[C-u C-c M-p] +| Load the form preceding point in the REPL buffer and eval. + | `cider-pprint-eval-last-sexp` | kbd:[C-c C-v C-f e] | Evaluate the form preceding point and pretty-print the result in a popup buffer. If invoked with a prefix argument, insert the result into the current buffer as a comment.