# HG changeset patch # User Augie Fackler # Date 1239767205 18000 # Node ID 4b9b90486260ff305ca24d8199b6d987c38dec4f # Parent f013f40e7b63c345cc74927bcd467fda3592c0e8 Fix an error in nose.el diff --git a/.elisp/nose.el b/.elisp/nose.el --- 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)