Created
June 3, 2015 03:58
-
-
Save lynaghk/0b401411dd55d7af20d2 to your computer and use it in GitHub Desktop.
copy and eval form in cider buffer.
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 cider-send-dwim (arg) | |
"Send the appropriate forms to the REPL to be evaluated." | |
(interactive "P") | |
(let ((expr (cider-last-sexp))) | |
(set-buffer (cider-current-repl-buffer)) | |
(unless (eq (current-buffer) (window-buffer)) | |
(pop-to-buffer (current-buffer) t)) | |
(goto-char (point-max)) | |
(insert expr) | |
(cider-repl-return) | |
(other-window 1))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment