]> code.delx.au - gnu-emacs-elpa/commitdiff
Document 'init and 'post-completion
authorDmitry Gutov <dgutov@yandex.ru>
Fri, 22 Mar 2013 22:34:50 +0000 (02:34 +0400)
committerDmitry Gutov <dgutov@yandex.ru>
Fri, 22 Mar 2013 22:35:52 +0000 (02:35 +0400)
.dir-locals.el
NEWS.md
company.el

index 3a4c010af48064ff9dd32f943b5ad0f5d02e024a..0f821cfd5647bbbc9bd8631ceee397264c104113 100644 (file)
@@ -1,3 +1,4 @@
 ((nil . ((indent-tabs-mode . nil)
          (fill-column . 80)
-         (sentence-end-double-space . t))))
+         (sentence-end-double-space . t)
+         (emacs-lisp-docstring-fill-column . t))))
diff --git a/NEWS.md b/NEWS.md
index 157e6def728f891f128b2db5aefc4d7c30afb67a..5d862955c5b2d7c20c8253d91365cd7931968faf 100644 (file)
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,7 @@
 
 ## Next
 
+* Documented `init` and `post-completion` back-end commands.
 * `company-eclim` and `company-clang` only expand the template on explicit user
   action (such as `company-complete-{selection,number,mouse}`).
 * `company-template` has some breaking changes.  When point is at one of the
index b434747610841e86889e952c40fe11246aecf85b..4a93d6201ca45c1fa9e8a7d50f8b4a7af81ef654 100644 (file)
@@ -320,6 +320,14 @@ not offering as a candidate.  Use with care!  The default value nil gives the
 user that choice with `company-require-match'.  Return value 'never overrides
 that option the other way around.
 
+`init': Called once for each buffer, the back-end can check for external
+programs and files and load any required libraries.  Raising an error here will
+show up in message log once, and the backend will not be used for completion.
+
+`post-completion': Called after a completion candidate has been inserted into
+the buffer.  The second argument is the candidate.  Can be used to modify it,
+e.g. to expand a snippet.
+
 The back-end should return nil for all commands it does not support or
 does not know about.  It should also be callable interactively and use
 `company-begin-backend' to start itself in that case."