Skip to content
Browse files

Merge branch 'master' of git@github.com:georgi/elisp

  • Loading branch information...
2 parents 6376758 + 2e53d10 commit 542c67b175207e9e330c3fbbf0e1f48d6148af88 matti committed May 24, 2011
Showing with 36 additions and 11 deletions.
  1. +36 −11 init.el
View
47 init.el
@@ -168,11 +168,11 @@
))
(setq tabbar-buffer-list-function
- (lambda ()
- (remove-if
- (lambda(buffer)
- (find (aref (buffer-name buffer) 0) " *"))
- (buffer-list))))
+ (lambda ()
+ (remove-if
+ (lambda(buffer)
+ (find (aref (buffer-name buffer) 0) " *"))
+ (buffer-list))))
(setq tabbar-buffer-groups-function 'tabbar-buffer-groups)
;; ********************************************************************************
@@ -370,6 +370,29 @@
(add-hook 'ruby-mode-hook 'ruby-mode-on-init)
+(defun rspec-run-single-file (spec-file &rest opts)
+ "Runs spec with the specified options"
+ (rspec-register-verify-redo (cons 'rspec-run-single-file (cons spec-file opts)))
+ (compile (concat "spec " spec-file " --drb " (mapconcat (lambda (x) x) opts " ")))
+ (end-of-buffer-other-window 0))
+
+(defun rspec-verify ()
+ "Runs the specified spec, or the spec file for the current buffer."
+ (interactive)
+ (rspec-run-single-file (rspec-spec-file-for (buffer-file-name))))
+
+(defun rspec-verify-single ()
+ "Runs the specified example at the point of the current buffer."
+ (interactive)
+ (rspec-run-single-file (rspec-spec-file-for (buffer-file-name)) (concat "--line " (number-to-string (line-number-at-pos)))))
+
+(defun rspec-verify-all ()
+ "Runs the 'spec' rake task for the project of the current file."
+ (interactive)
+ (let ((default-directory (or (rspec-project-root) default-directory)))
+ (rspec-run "--format=progress")))
+
+
;; ********************************************************************************
;; RHTML Mode
@@ -740,8 +763,10 @@
("<M-backspace>" . term-send-backward-kill-word)
("M-r" . term-send-reverse-search-history)))
-(global-set-key (kbd "M-t") 'multi-term-next)
-(global-set-key (kbd "M-T") 'multi-term)
+;; (global-set-key (kbd "M-t") 'multi-term-next)
+;; (global-set-key (kbd "M-T") 'multi-term)
+
+(global-set-key (kbd "M-t") 'eshell)
;; (global-set-key (kbd "<M-right>") 'multi-term-next)
@@ -870,14 +895,14 @@
(hide-mode-line)
(if darkroom-enabled
(progn
- ;; (w32-fullscreen-on)
- (w32-fullscreen-toggle-titlebar)
+ ;; (w32-fullscreen-on)
+ (w32-fullscreen-toggle-titlebar)
(fringe-mode 'both)
(menu-bar-mode -1)
- (tabbar-mode -1)
+ (tabbar-mode -1)
(scroll-bar-mode -1)
;; (set-fringe-mode 80)
- )
+ )
(progn
(w32-fullscreen-toggle-titlebar)
(fringe-mode 'default)

0 comments on commit 542c67b

Please sign in to comment.
Something went wrong with that request. Please try again.