Mercurial > dotfiles
diff .elisp/nose.el @ 85:4b9b90486260
Fix an error in nose.el
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Tue, 14 Apr 2009 22:46:45 -0500 |
parents | f013f40e7b63 |
children | 79eec81404c3 |
line wrap: on
line diff
--- a/.elisp/nose.el +++ b/.elisp/nose.el @@ -48,8 +48,8 @@ (where (nose-find-project-root)) (args (if debug "--pdb" "")) (tnames (if tests tests ""))) - (funcall (if debug - 'pdb + (funcall (if debug + 'pdb '(lambda (command) (compilation-start command nil @@ -88,7 +88,7 @@ (defun nose-find-test-runner () (message - (let ((result + (let ((result (reduce '(lambda (x y) (or x y)) (mapcar 'nose-find-test-runner-names nose-project-names)))) (if result @@ -97,7 +97,7 @@ (defun nose-find-test-runner-names (runner) "find eggs/bin/test in a parent dir of current buffer's file" - (nose-find-test-runner-in-dir-named + (nose-find-test-runner-in-dir-named (file-name-directory buffer-file-name) runner)) (defun nose-find-test-runner-in-dir-named (dn runner) @@ -117,7 +117,7 @@ (cond ((equal outer-def "def") outer-obj) ((equal inner-obj outer-obj) outer-obj) (t (format "%s.%s" outer-obj inner-obj))))) - + (defun inner-testable () (save-excursion (re-search-backward @@ -128,27 +128,27 @@ (save-excursion (re-search-backward "^\\(class\\|def\\)[ \t]+\\([a-zA-Z0-9_]+\\)" nil t) - (let ((result + (let ((result (buffer-substring-no-properties (match-beginning 2) (match-end 2)))) - (cons + (cons (buffer-substring-no-properties (match-beginning 1) (match-end 1)) result)))) -(defun nose-find-project-root (&optional dirname) +(defun nose-find-project-root (&optional dirname) (interactive) (let ((dn (if dirname - dirname + dirname (file-name-directory buffer-file-name)))) (cond ((nose-project-root dn) (expand-file-name dn)) ((equal (expand-file-name dn) "/") nil) - (t1 (nose-find-project-root + (t (nose-find-project-root (file-name-directory (directory-file-name dn))))))) (defun nose-project-root (dirname) (reduce '(lambda (x y) (or x y)) (mapcar (lambda (d) (member d (directory-files dirname))) nose-project-root-files))) - + (provide 'nose)