Created
October 15, 2013 22:12
-
-
Save maruks/6999491 to your computer and use it in GitHub Desktop.
emacs lisp function that compiles current buffer and runs speclj tests in repl 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 compile-run-tests (arg) | |
(interactive "P") | |
(let ((oldbuf (current-buffer))) | |
(save-buffer) | |
(nrepl-load-current-buffer) | |
(nrepl-switch-to-relevant-repl-buffer nil) | |
(insert "(run-specs)") | |
(nrepl-return) | |
(unless arg | |
(switch-to-buffer-other-window oldbuf)))) | |
(eval-after-load 'clojure-mode | |
'(progn | |
(define-key clojure-mode-map (kbd "<f6>") 'compile-run-tests) | |
(define-key clojure-mode-map (kbd "\e\er") 'nrepl-switch-to-relevant-repl-buffer))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment