[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 15/52: company-files-complete: move files in subdirs to the end
From: |
Dmitry Gutov |
Subject: |
[elpa] 15/52: company-files-complete: move files in subdirs to the end |
Date: |
Tue, 01 Jul 2014 11:53:11 +0000 |
dgutov pushed a commit to branch master
in repository elpa.
commit d2269a13c3b635c1a5ac96bbc6284feb71021214
Author: Dmitry Gutov <address@hidden>
Date: Mon May 26 21:39:23 2014 +0300
company-files-complete: move files in subdirs to the end
#116
---
company-files.el | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/company-files.el b/company-files.el
index a839f79..3dc4d86 100644
--- a/company-files.el
+++ b/company-files.el
@@ -59,17 +59,19 @@
(defun company-files-complete (prefix)
(let* ((dir (file-name-directory prefix))
(file (file-name-nondirectory prefix))
- candidates)
+ candidates directories)
(unless (equal dir (car company-files-completion-cache))
(dolist (file (company-files-directory-files dir file))
(setq file (concat dir file))
(push file candidates)
(when (file-directory-p file)
- ;; Add one level of children.
- (dolist (child (company-files-directory-files file ""))
- (push (concat file
- (unless (eq (aref file (1- (length file))) ?/) "/")
- child) candidates))))
+ (push file directories)))
+ (dolist (directory (reverse directories))
+ ;; Add one level of children.
+ (dolist (child (company-files-directory-files directory ""))
+ (push (concat directory
+ (unless (eq (aref directory (1- (length directory)))
?/) "/")
+ child) candidates)))
(setq company-files-completion-cache (cons dir (nreverse candidates))))
(all-completions prefix
(cdr company-files-completion-cache))))
- [elpa] 05/52: Respect tooltip align annotations in company-yasnippet., (continued)
- [elpa] 05/52: Respect tooltip align annotations in company-yasnippet., Dmitry Gutov, 2014/07/01
- [elpa] 08/52: company-search-map: bind DEL to company-search-other-char, Dmitry Gutov, 2014/07/01
- [elpa] 07/52: Account for the line continuation column in graphical mode, Dmitry Gutov, 2014/07/01
- [elpa] 09/52: company-sort-by-occurrence: include words on the same line, too, Dmitry Gutov, 2014/07/01
- [elpa] 06/52: Merge pull request #106 from proofit404/master, Dmitry Gutov, 2014/07/01
- [elpa] 11/52: company-clang--build-complete-args: don't call -cc1 directly, Dmitry Gutov, 2014/07/01
- [elpa] 10/52: company--multi-backend-adapter-candidates: compare string values of prefix, Dmitry Gutov, 2014/07/01
- [elpa] 12/52: company-clang--annotation: include method qualifiers in the annotation, Dmitry Gutov, 2014/07/01
- [elpa] 13/52: NEWS: document the change in clang invocation, Dmitry Gutov, 2014/07/01
- [elpa] 14/52: company--continue: don't pass the new prefix to `company-cancel', Dmitry Gutov, 2014/07/01
- [elpa] 15/52: company-files-complete: move files in subdirs to the end,
Dmitry Gutov <=
- [elpa] 16/52: Introduce company-tooltip-flip-when-above, Dmitry Gutov, 2014/07/01
- [elpa] 17/52: Fix typo, Dmitry Gutov, 2014/07/01
- [elpa] 18/52: extended gtags functionality #90 showing annotations and meta, Dmitry Gutov, 2014/07/01
- [elpa] 21/52: Merge pull request #126 from ksjogo/gtags, Dmitry Gutov, 2014/07/01
- [elpa] 19/52: fixing let in gtags annotation, Dmitry Gutov, 2014/07/01
- [elpa] 20/52: Add new possible value to `company-dabbrev-code-other-buffers', Dmitry Gutov, 2014/07/01
- [elpa] 03/52: company-clang: don't mistake scoping operator for objc args, Dmitry Gutov, 2014/07/01
- [elpa] 24/52: Merge pull request #127 from bbatsov/doc-fixes, Dmitry Gutov, 2014/07/01
- [elpa] 23/52: Small fixes, Dmitry Gutov, 2014/07/01
- [elpa] 25/52: Some indentation fixes, Dmitry Gutov, 2014/07/01