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

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

[ELPA-diffs] [elpa] 09/14: company-capf: Perform sorting before prefix a


From: emacs-devel
Subject: [ELPA-diffs] [elpa] 09/14: company-capf: Perform sorting before prefix adjustment
Date: Tue, 14 Jan 2014 20:57:11 +0000

This is an automated email from the git hooks/post-receive script.

root pushed a commit to branch master
in repository elpa.

commit 8ecec3594931ae8e2329fec4b793ad4ba392e4ef
Author: Dmitry Gutov <address@hidden>
Date:   Mon Jan 6 07:53:07 2014 +0400

    company-capf: Perform sorting before prefix adjustment
---
 company-capf.el |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/company-capf.el b/company-capf.el
index ee2ac1e..6dcd87b 100644
--- a/company-capf.el
+++ b/company-capf.el
@@ -54,13 +54,14 @@ Requires Emacs 24.1 or newer."
                 (sortfun (cdr (assq 'display-sort-function meta)))
                 (boundaries (completion-boundaries arg table pred ""))
                 (candidates (all-completions arg table pred)))
-           (unless (zerop (car boundaries))
-             (let ((before (substring arg 0 (car boundaries))))
-               (setq candidates
-                     (mapcar (lambda (candidate)
-                               (concat before candidate))
-                             candidates))))
-           (if sortfun (funcall sortfun candidates) candidates)))))
+           (when sortfun
+             (setq candidates (funcall sortfun candidates)))
+           (if (not (zerop (car boundaries)))
+               (let ((before (substring arg 0 (car boundaries))))
+                 (mapcar (lambda (candidate)
+                           (concat before candidate))
+                         candidates))
+             candidates)))))
     (`sorted
      (let ((res (company--capf-data)))
        (when res

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.



reply via email to

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