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

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

[elpa] 12/35: Remove `company-locate-dominating-file'


From: Dmitry Gutov
Subject: [elpa] 12/35: Remove `company-locate-dominating-file'
Date: Sat, 19 Apr 2014 10:12:16 +0000

dgutov pushed a commit to branch master
in repository elpa.

commit e642d215df387d2fd7ba0db6ebec0cb121b34657
Author: Dmitry Gutov <address@hidden>
Date:   Tue Apr 1 04:36:31 2014 +0300

    Remove `company-locate-dominating-file'
---
 company-eclim.el   |    2 +-
 company-etags.el   |    6 +++---
 company-gtags.el   |    2 +-
 company-pysmell.el |    2 +-
 company.el         |   12 ------------
 5 files changed, 6 insertions(+), 18 deletions(-)

diff --git a/company-eclim.el b/company-eclim.el
index d6f699a..65fb215 100644
--- a/company-eclim.el
+++ b/company-eclim.el
@@ -92,7 +92,7 @@ eclim can only complete correctly when the buffer has been 
saved."
       (setq company-eclim--project-dir
             (directory-file-name
              (expand-file-name
-              (company-locate-dominating-file buffer-file-name ".project"))))
+              (locate-dominating-file buffer-file-name ".project"))))
     company-eclim--project-dir))
 
 (defun company-eclim--project-name ()
diff --git a/company-etags.el b/company-etags.el
index 0c84458..6f4912f 100644
--- a/company-etags.el
+++ b/company-etags.el
@@ -51,9 +51,9 @@ buffer automatically."
 (make-variable-buffer-local 'company-etags-buffer-table)
 
 (defun company-etags-find-table ()
-  (let ((file (company-locate-dominating-file (or buffer-file-name
-                                                  default-directory)
-                                              "TAGS")))
+  (let ((file (locate-dominating-file (or buffer-file-name
+                                          default-directory)
+                                      "TAGS")))
     (when file
       (list (expand-file-name file)))))
 
diff --git a/company-gtags.el b/company-gtags.el
index 6b4e399..6451007 100644
--- a/company-gtags.el
+++ b/company-gtags.el
@@ -49,7 +49,7 @@
 (defun company-gtags--tags-available-p ()
   (if (eq company-gtags--tags-available-p 'unknown)
       (setq company-gtags--tags-available-p
-            (company-locate-dominating-file buffer-file-name "GTAGS"))
+            (locate-dominating-file buffer-file-name "GTAGS"))
     company-gtags--tags-available-p))
 
 (defun company-gtags-fetch-tags (prefix)
diff --git a/company-pysmell.el b/company-pysmell.el
index 063d8ea..fdb1b78 100644
--- a/company-pysmell.el
+++ b/company-pysmell.el
@@ -36,7 +36,7 @@
 (defun company-pysmell--available-p ()
   (if (eq company-pysmell--available-p 'unknown)
       (setq company-pysmell--available-p
-            (company-locate-dominating-file buffer-file-name "PYSMELLTAGS"))
+            (locate-dominating-file buffer-file-name "PYSMELLTAGS"))
     company-pysmell--available-p))
 
 (defun company-pysmell--grab-symbol ()
diff --git a/company.el b/company.el
index 44322d2..35eb165 100644
--- a/company.el
+++ b/company.el
@@ -792,18 +792,6 @@ means that `company-mode' is always turned on except in 
`message-mode' buffers."
         (car (setq ppss (cdr ppss)))
         (nth 3 ppss))))
 
-(if (fboundp 'locate-dominating-file)
-    (defalias 'company-locate-dominating-file 'locate-dominating-file)
-  (defun company-locate-dominating-file (file name)
-    (catch 'root
-      (let ((dir (file-name-directory file))
-            (prev-dir nil))
-        (while (not (equal dir prev-dir))
-          (when (file-exists-p (expand-file-name name dir))
-            (throw 'root dir))
-          (setq prev-dir dir
-                dir (file-name-directory (directory-file-name dir))))))))
-
 (defun company-call-backend (&rest args)
   (let ((val (apply #'company-call-backend-raw args)))
     (if (not (eq (car-safe val) :async))



reply via email to

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