]> code.delx.au - gnu-emacs-elpa/commitdiff
Drop support for `crop'
authorDmitry Gutov <dgutov@yandex.ru>
Sun, 30 Mar 2014 03:51:06 +0000 (06:51 +0300)
committerDmitry Gutov <dgutov@yandex.ru>
Sun, 30 Mar 2014 03:51:06 +0000 (06:51 +0300)
NEWS.md
company.el

diff --git a/NEWS.md b/NEWS.md
index 76a960fb2292704a47eb9a8a686b4001ba2747a9..c206ee5d4e2f1a8e38e1e0893ae7579422b0c71e 100644 (file)
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,7 @@
 
 ## Next
 
+* Support for back-end command `crop` dropped (it was never documented).
 * Support for Emacs 23 dropped.
 * New user option `company-abort-manual-when-too-short`.
 
index 5a6d020f32c7685c24c265fcc662e565945e365f..7398e8009579e4bc92aa30f916f9b869aca2e7a1 100644 (file)
@@ -983,20 +983,14 @@ can retrieve meta-data for them."
     ;; `company-complete-common'.
     (setq company-common
           (if (cdr company-candidates)
-              (company--safe-candidate
-               (let ((common (try-completion company-prefix company-candidates)))
-                 (if (eq common t)
-                     ;; Mulple equal strings, probably with different
-                     ;; annotations.
-                     company-prefix
-                   common)))
+              (let ((common (try-completion company-prefix company-candidates)))
+                (if (eq common t)
+                    ;; Mulple equal strings, probably with different
+                    ;; annotations.
+                    company-prefix
+                  common))
             (car company-candidates)))))
 
-(defun company--safe-candidate (str)
-  ;; XXX: This feature is deprecated.
-  (or (company-call-backend 'crop str)
-      str))
-
 (defun company-calculate-candidates (prefix)
   (let ((candidates (cdr (assoc prefix company-candidates-cache)))
         (ignore-case (company-call-backend 'ignore-case)))
@@ -1653,8 +1647,6 @@ and invoke the normal binding."
   (interactive)
   (when (company-manual-begin)
     (let ((result (nth company-selection company-candidates)))
-      (when company--auto-completion
-        (setq result (company--safe-candidate result)))
       (company-finish result))))
 
 (defun company-complete-common ()