Skip to content

Commit

Permalink
Make malabar-find-project-file signal an error if no POM is found (cl…
Browse files Browse the repository at this point in the history
…oses #45)
  • Loading branch information
espenhw committed Sep 24, 2010
1 parent 17bb24f commit 7aaa6fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ anything you don't like.


### But there is more: ### 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 - A [Groovy][] console for rapid prototyping and exploratory programming


Expand Down
6 changes: 4 additions & 2 deletions src/main/lisp/malabar-project.el
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -103,8 +103,10 @@
"testClasspath"))) "testClasspath")))


(defun malabar-find-project-file (&optional buffer) (defun malabar-find-project-file (&optional buffer)
(when-let (file (buffer-file-name (or buffer (current-buffer)))) (let ((buffer (or buffer (current-buffer))))
(malabar--project-for-file file))) (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) (defun malabar--project-for-file (file)
(when-let (dir (locate-dominating-file file "pom.xml")) (when-let (dir (locate-dominating-file file "pom.xml"))
Expand Down

0 comments on commit 7aaa6fa

Please sign in to comment.