]> code.delx.au - gnu-emacs-elpa/commitdiff
Mention company-sort-prefer-same-case-prefix
authorDmitry Gutov <dgutov@yandex.ru>
Mon, 20 Jun 2016 02:16:57 +0000 (05:16 +0300)
committerDmitry Gutov <dgutov@yandex.ru>
Mon, 20 Jun 2016 02:16:57 +0000 (05:16 +0300)
NEWS.md
company.el

diff --git a/NEWS.md b/NEWS.md
index 0354b92c167e1c54162fe4fc6fa8ced191969010..0ded600101731dc9214aeaf6801de8ebb2c91f1c 100644 (file)
--- a/NEWS.md
+++ b/NEWS.md
@@ -5,6 +5,7 @@
 * Group of backends can now contain keyword `:separate`, which makes candidates
   from different backends sorted separately in the combined list.
 * New frontend `company-pseudo-tooltip-unless-just-one-frontend-with-delay`.
+* New transformer `company-sort-prefer-same-case-prefix`.
 * The value of `company-dabbrev-ignore-buffers` can also be a function.
 * `company-files` has been moved to right after `company-capf` in
   `company-backends`
index 9e45e9258286f7e53af5402b82773f92f11e739a..27bee545acef1ea334e3957546db662b36af24a3 100644 (file)
@@ -1356,9 +1356,9 @@ from the rest of the backends in the group, if any, will be left at the end."
                    (or (not b1) (not (memq b1 low-priority)))))))))))
 
 (defun company-sort-prefer-same-case-prefix (candidates)
-  "Prefer CANDIDATES with the same case sensitive prefix.
+  "Prefer CANDIDATES with the exact same prefix.
 If a backend returns case insensitive matches, candidates with the an exact
-prefix match will be prioritized even if this changes the lexical order."
+prefix match (same case) will be prioritized."
   (cl-loop for candidate in candidates
            if (string-prefix-p company-prefix candidate)
            collect candidate into same-case