Skip to content

Instantly share code, notes, and snippets.

@asok
Created March 3, 2013 18:36
Show Gist options
  • Save asok/5077527 to your computer and use it in GitHub Desktop.
Save asok/5077527 to your computer and use it in GitHub Desktop.
diff --git a/rspec-mode.el b/rspec-mode.el
index 29c0d28..e7c5431 100644
--- a/rspec-mode.el
+++ b/rspec-mode.el
@@ -153,6 +153,11 @@
:type 'string
:group 'rspec-mode)
+(defcustom rspec-compilation-in-comint-mode nil
+ "t when compilation buffer should be in Comint mode with `compilation-shell-minor-mode'"
+ :type 'boolean
+ :group 'rspec-mode)
+
(defcustom rspec-key-command-prefix (kbd "C-c ,")
"The prefix for all rspec related key commands"
:type 'string
@@ -429,7 +434,11 @@
(compile (mapconcat 'identity `(,(rspec-runner)
,(rspec-runner-options opts)
,a-file-or-dir) " ")
- 'rspec-compilation-mode))))
+ 'rspec-compilation-mode)))
+ (when rspec-compilation-in-comint-mode
+ (setq buffer-read-only nil)
+ (with-no-warnings (comint-mode))
+ (compilation-shell-minor-mode)))
(defvar rspec-compilation-mode-font-lock-keywords
'((compilation--ensure-parse)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment