From: Dmitry Gutov Date: Tue, 1 Apr 2014 01:36:31 +0000 (+0300) Subject: Remove `company-locate-dominating-file' X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/e642d215df387d2fd7ba0db6ebec0cb121b34657 Remove `company-locate-dominating-file' --- diff --git a/company-eclim.el b/company-eclim.el index d6f699a9d..65fb21554 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 0c84458a1..6f4912ff4 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 6b4e39942..645100757 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 063d8eafc..fdb1b78e0 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 44322d29d..35eb16523 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))