Permalink
Browse files

trying Rakefile or Makefile or .git as project root

  • Loading branch information...
1 parent c4ad474 commit 55d9a13613ed940c7938d22f68ea8b1fd6d9f2e0 @irfn irfn committed Jul 18, 2009
Showing with 6 additions and 2 deletions.
  1. +6 −2 textmate.el
View
@@ -203,7 +203,7 @@
(interactive)
(let ((root (textmate-project-root)))
(when (null root)
- (error "Can't find any .git directory"))
+ (error "Hai Can't find any .git directory"))
(find-file
(concat
(expand-file-name root) "/"
@@ -252,7 +252,11 @@
(defun textmate-find-project-root (&optional root)
(when (null root) (setq root default-directory))
(cond
- ((member "Rakefile" (directory-files root)) (expand-file-name root))
+ ((or
+ (member ".git" (directory-files root))
+ (member "Rakefile" (directory-files root))
+ (member "Makefile" (directory-files root)))
+ (expand-file-name root))
((equal (expand-file-name root) "/") nil)
(t (textmate-find-project-root (concat (file-name-as-directory root) "..")))))

0 comments on commit 55d9a13

Please sign in to comment.