Skip to content

Commit 3e23846

Browse files
yuhan0bbatsov
authored andcommitted
Add command for saving last eval to kill ring
1 parent 201811e commit 3e23846

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cider-eval.el

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,6 +1310,12 @@ passing arguments."
13101310
(form (format "(%s)" fn-name)))
13111311
(cider-read-and-eval (cons form (length form)))))
13121312

1313+
(defun cider-kill-last-result ()
1314+
"Save the last evaluated result into the kill ring."
1315+
(interactive)
1316+
(kill-new
1317+
(nrepl-dict-get (cider-nrepl-sync-request:eval "*1") "value")))
1318+
13131319
;; Eval keymaps
13141320
(defvar cider-eval-pprint-commands-map
13151321
(let ((map (define-prefix-command 'cider-eval-pprint-commands-map)))

0 commit comments

Comments
 (0)