-
-
Notifications
You must be signed in to change notification settings - Fork 248
Closed
Description
Hi! Is it my impression, or the current definition of the clojure-test-maybe-enable has two setbacks?
- First, it doesn't do anything related to the directory the file is in, unlike the docstring statement.
- Second, the check it does will search for "clojure.test" on the file - isn't that somehow limitative (despite the fact that it won't be a good detection method, if the file contains that string in a comment somewhere else besides the namespace, e.g. ...)
I propose the following change, as it works for - what i believe to be - the right way to specify tests:
(defun clojure-test-maybe-enable ()
"Enable clojure-test-mode if the current buffer contains a namespace
with a \"test.\" bit on it."
(let ((ns (clojure-find-package))) ; defined in clojure-mode.el
(when (search "test." ns)
(clojure-test-mode t))))
What do you think?
Metadata
Metadata
Assignees
Labels
No labels