Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

better error handling:

- (ffip-project-root) returns nil if no project root
- (ffip-project-files) errors out if no project root
  • Loading branch information...
commit e8b9dabd6d71d2eceeaa899fcce6f63925a21a41 1 parent 5e7ade8
@stuarthalloway stuarthalloway authored committed
Showing with 5 additions and 2 deletions.
  1. +5 −2 find-file-in-project.el
View
7 find-file-in-project.el
@@ -113,7 +113,9 @@ directory they are found in so that they are unique."
file-cons))
(split-string (shell-command-to-string
(format "find %s -type f %s %s"
- (or ffip-project-root (ffip-project-root))
+ (or ffip-project-root
+ (ffip-project-root)
+ (error "no project root found"))
(ffip-join-patterns)
ffip-find-options))))))
@@ -157,7 +159,8 @@ project-local-variables.el."
(ffip-locate-dominating-file default-directory ffip-project-file))))
(or project-root
- (message "No project was defined for the current file."))))
+ (progn (message "No project was defined for the current file.")
+ nil))))
;; Backport functionality to Emacs 22
(if (functionp 'locate-dominating-file)
Please sign in to comment.
Something went wrong with that request. Please try again.