Permalink
Browse files

Clear compilation buffer in between test runs.

  • Loading branch information...
1 parent 38376e2 commit 838e8f932cc71d59fe6c4c9cd8de7b1838358bed @technomancy technomancy committed Nov 27, 2008
Showing with 10 additions and 0 deletions.
  1. +10 −0 starter-kit-ruby.el
View
@@ -20,6 +20,16 @@
;; We never want to edit Rubinius bytecode
(add-to-list 'completion-ignored-extensions ".rbc")
+;; Clear the compilation buffer between test runs.
+(eval-after-load 'ruby-compilation
+ '(progn
+ (defadvice ruby-do-run-w/compilation (before kill-buffer (name cmdlist))
+ (let ((comp-buffer-name (format "*%s*" name)))
+ (when (get-buffer comp-buffer-name)
+ (with-current-buffer comp-buffer-name
+ (delete-region (point-min) (point-max))))))
+ (ad-activate 'ruby-do-run-w/compilation)))
+
;; TODO: set up ri
;; TODO: electric
;; TODO: flymake

0 comments on commit 838e8f9

Please sign in to comment.