emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master c6d5330 165/173: company-eclim--project-dir: Try to handle


From: Dmitry Gutov
Subject: [elpa] master c6d5330 165/173: company-eclim--project-dir: Try to handle non-project buffers
Date: Thu, 23 Jun 2016 00:28:48 +0000 (UTC)

branch: master
commit c6d53302b114ba50a8e48ce98b906849fded86f4
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    company-eclim--project-dir: Try to handle non-project buffers
    
    Closes #532
---
 company-eclim.el |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/company-eclim.el b/company-eclim.el
index 208daf5..b37f756 100644
--- a/company-eclim.el
+++ b/company-eclim.el
@@ -89,10 +89,11 @@ eclim can only complete correctly when the buffer has been 
saved."
 
 (defun company-eclim--project-dir ()
   (if (eq company-eclim--project-dir 'unknown)
-      (setq company-eclim--project-dir
-            (directory-file-name
-             (expand-file-name
-              (locate-dominating-file buffer-file-name ".project"))))
+      (let ((dir (locate-dominating-file buffer-file-name ".project")))
+        (when dir
+          (setq company-eclim--project-dir
+                (directory-file-name
+                 (expand-file-name dir)))))
     company-eclim--project-dir))
 
 (defun company-eclim--project-name ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]