]> code.delx.au - gnu-emacs-elpa/commitdiff
company-backends: Clarify that responding to `match' is never mandatory
authorDmitry Gutov <dgutov@yandex.ru>
Mon, 24 Nov 2014 03:27:08 +0000 (05:27 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Mon, 24 Nov 2014 03:27:08 +0000 (05:27 +0200)
https://github.com/abingham/emacs-ycmd/pull/92

company.el

index cb478cc554fc1f3d34e18eaf4e73b662ba1c3ef6..cc6ab795acda5a674f656df0c393ca235545ecd9 100644 (file)
@@ -352,8 +352,8 @@ return value should be a list of candidates that match the prefix.
 
 Non-prefix matches are also supported (candidates that don't start with the
 prefix, but match it in some backend-defined way).  Backends that use this
 
 Non-prefix matches are also supported (candidates that don't start with the
 prefix, but match it in some backend-defined way).  Backends that use this
-feature must disable cache (return t to `no-cache') and should also respond
-to `match'.
+feature must disable cache (return t to `no-cache') and might also want to
+respond to `match'.
 
 Optional commands:
 
 
 Optional commands:
 
@@ -384,10 +384,10 @@ be kept if they have different annotations.  For that to work properly,
 backends should store the related information on candidates using text
 properties.
 
 backends should store the related information on candidates using text
 properties.
 
-`match': The second argument is a completion candidate.  Backends that
-provide non-prefix completions should return the position of the end of
-text in the candidate that matches `prefix'.  It will be used when
-rendering the popup.
+`match': The second argument is a completion candidate.  Return the index
+after the end of text matching `prefix' within the candidate string.  It
+will be used when rendering the popup.  This command only makes sense for
+backends that provide non-prefix completion.
 
 `require-match': If this returns t, the user is not allowed to enter
 anything not offered as a candidate.  Use with care!  The default value nil
 
 `require-match': If this returns t, the user is not allowed to enter
 anything not offered as a candidate.  Use with care!  The default value nil