From: Dmitry Gutov Date: Mon, 20 Jun 2016 02:16:57 +0000 (+0300) Subject: Mention company-sort-prefer-same-case-prefix X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/6067bc693b739c6b5d17393809404e0aef831a2a Mention company-sort-prefer-same-case-prefix --- diff --git a/NEWS.md b/NEWS.md index 0354b92c1..0ded60010 100644 --- 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` diff --git a/company.el b/company.el index 9e45e9258..27bee545a 100644 --- a/company.el +++ b/company.el @@ -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