Permalink
Browse files

Make malabar-find-project-file signal an error if no POM is found (cl…

…oses #45)
  • Loading branch information...
1 parent 17bb24f commit 7aaa6fa5e8f724c08a48cd0d2a71e4f420a135ee @espenhw espenhw committed Sep 24, 2010
Showing with 6 additions and 3 deletions.
  1. +2 −1 README.md
  2. +4 −2 src/main/lisp/malabar-project.el
View
3 README.md
@@ -58,7 +58,8 @@ anything you don't like.
### But there is more:
-- Tight integration with [Maven][]
+- Tight integration with [Maven][]; if fact, so tight that if you're
+ not using Maven (why?) you should not consider malabar-mode.
- A [Groovy][] console for rapid prototyping and exploratory programming
View
6 src/main/lisp/malabar-project.el
@@ -103,8 +103,10 @@
"testClasspath")))
(defun malabar-find-project-file (&optional buffer)
- (when-let (file (buffer-file-name (or buffer (current-buffer))))
- (malabar--project-for-file file)))
+ (let ((buffer (or buffer (current-buffer))))
+ (or (when-let (file (buffer-file-name buffer))
+ (malabar--project-for-file file))
+ (error "No POM found for buffer %s" buffer))))
(defun malabar--project-for-file (file)
(when-let (dir (locate-dominating-file file "pom.xml"))

0 comments on commit 7aaa6fa

Please sign in to comment.