-
-
Save cbilson/7601239 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun nrepl-eval-expression-at-point-in-repl () | |
(interactive) | |
(let ((form (nrepl-expression-at-point))) | |
;; Strip excess whitespace | |
(while (string-match "\\`\s+\\|\n+\\'" form) | |
(setq form (replace-match "" t t form))) | |
(set-buffer (cider-current-repl-buffer)) | |
(goto-char (point-max)) | |
(insert form) | |
(nrepl-return))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Doh! I hate it when I find something new in emacs, get it all setup and working, only to find that it's already been implemented. Don't use this, use
'cider-eval-last-sexp-to-repl
instead.