]> code.delx.au - gnu-emacs-elpa/blobdiff - company.el
Revert "Remove the [return] binding (#530)"
[gnu-emacs-elpa] / company.el
index 9e45e9258286f7e53af5402b82773f92f11e739a..bfadc99a792c6352d2bfe109bc537dbdb0a49470 100644 (file)
@@ -643,6 +643,7 @@ asynchronous call into synchronous.")
     (define-key keymap [mouse-3] 'company-select-mouse)
     (define-key keymap [up-mouse-1] 'ignore)
     (define-key keymap [up-mouse-3] 'ignore)
+    (define-key keymap [return] 'company-complete-selection)
     (define-key keymap (kbd "RET") 'company-complete-selection)
     (define-key keymap [tab] 'company-complete-common)
     (define-key keymap (kbd "TAB") 'company-complete-common)
@@ -1356,9 +1357,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