Skip to content

Instantly share code, notes, and snippets.

@halgari
Created October 16, 2013 03:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save halgari/7002344 to your computer and use it in GitHub Desktop.
Save halgari/7002344 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 "*nrepl*")
(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