Skip to content

Instantly share code, notes, and snippets.

@cbilson
Forked from halgari/gist:7002344
Last active December 29, 2015 02:29
Show Gist options
  • Save cbilson/7601239 to your computer and use it in GitHub Desktop.
Save cbilson/7601239 to your computer and use it in GitHub Desktop.
(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)))
@cbilson
Copy link
Author

cbilson commented Nov 22, 2013

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment