]> code.delx.au - gnu-emacs-elpa/commitdiff
Remove `company-locate-dominating-file'
authorDmitry Gutov <dgutov@yandex.ru>
Tue, 1 Apr 2014 01:36:31 +0000 (04:36 +0300)
committerDmitry Gutov <dgutov@yandex.ru>
Tue, 1 Apr 2014 01:36:31 +0000 (04:36 +0300)
company-eclim.el
company-etags.el
company-gtags.el
company-pysmell.el
company.el

index d6f699a9d4de055effc43717ea4ff828c823c804..65fb215542f4b1246f6c5a09e766cfb4786fb66e 100644 (file)
@@ -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 ()
index 0c84458a1b8f278e035a05678a3c8339d9b4d86e..6f4912ff4917d16955fd21701fc59466323a9e41 100644 (file)
@@ -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)))))
 
index 6b4e399420618407c57d2f0eb05ec1981f75fe14..645100757e97c131b79f58b3f12ed43587e8d2d8 100644 (file)
@@ -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)
index 063d8eafcd89baf5dd79c7a6859b85f1e500fa76..fdb1b78e025e580f1d6cb6d15f0bc3d5295c4178 100644 (file)
@@ -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 ()
index 44322d29d6d7c0ebe5194b568e5ed845367e898a..35eb16523cb7af4ed93e23295c0545df63fd0981 100644 (file)
@@ -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))