Skip to content

Commit 2dcd169

Browse files
committed
Merge pull request #1 from greywolve/patch-1
Update README.md
2 parents c728e6a + 9c1b7ee commit 2dcd169

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,24 @@ In the talk, I used a binding (CTRL-`) and this emacs code to run each form one
2121
(insert form)
2222
(nrepl-return)))
2323

24+
If you are using [CIDER](https://github.com/clojure-emacs/cider) below is the equivalent.
25+
26+
27+
28+
(defun cider-eval-expression-at-point-in-repl ()
29+
(interactive)
30+
(let ((form (cider-sexp-at-point)))
31+
;; Strip excess whitespace
32+
(while (string-match "\\`\s+\\|\n+\\'" form)
33+
(setq form (replace-match "" t t form)))
34+
(set-buffer (cider-find-or-create-repl-buffer))
35+
(goto-char (point-max))
36+
(insert form)
37+
(cider-repl-return)))
38+
39+
40+
41+
2442

2543
## License
2644

0 commit comments

Comments
 (0)