Skip to content

Commit

Permalink
Add command for saving last eval to kill ring
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhan0 committed Feb 24, 2022
1 parent 0b0d13f commit d3c042f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cider-eval.el
Expand Up @@ -1310,6 +1310,12 @@ passing arguments."
(form (format "(%s)" fn-name)))
(cider-read-and-eval (cons form (length form)))))

(defun cider-kill-last-result ()
"Save the last evaluated result into the kill ring."
(interactive)
(kill-new
(nrepl-dict-get (cider-nrepl-sync-request:eval "*1") "value")))

;; Eval keymaps
(defvar cider-eval-pprint-commands-map
(let ((map (define-prefix-command 'cider-eval-pprint-commands-map)))
Expand Down

0 comments on commit d3c042f

Please sign in to comment.