From: Dmitry Gutov Date: Mon, 5 Oct 2015 16:50:26 +0000 (+0300) Subject: Retouch the docstring further X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/433ae926feed34b90251e94ad5df7fb26a786e5a Retouch the docstring further --- diff --git a/company.el b/company.el index 3c00ba503..96bfbf06a 100644 --- a/company.el +++ b/company.el @@ -422,15 +422,16 @@ An element of `company-backends' can also be a list of backends. The completions from backends in such groups are merged, but only from those backends which return the same `prefix'. -Whenever makes sense, company commands taking a candidate as an argument -are dispatched to the backend it came from. In other cases, the first -non-nil value among all the backends is returned. +If a backend command takes a candidate as an argument (e.g. `meta'), the +call is dispatched to the backend the candidate came from. In other +cases (except for `duplicates' and `sorted'), the first non-nil value among +all the backends is returned. The group can also contain keywords. Currently, `:with' and `:sorted' -keywords are defined. If the group contains keyword `:with' , the backends -listed after this keyword are ignored for the purpose of `prefix' -command. If a grouped backend contains keyword `:sorted', the -final (merged) list of candidates is not sorted. +keywords are defined. If the group contains keyword `:with', the backends +listed after this keyword are ignored for the purpose of the `prefix' +command. If the group contains keyword `:sorted', the final list of +candidates is not sorted after concatenation. Asynchronous backends ===================== @@ -899,10 +900,10 @@ means that `company-mode' is always turned on except in `message-mode' buffers." (when (eq command 'prefix) (setq backends (butlast backends (length (member :with backends))))) - + (unless (memq command '(sorted)) (setq backends (cl-delete-if #'keywordp backends))) - + (pcase command (`candidates (company--multi-backend-adapter-candidates backends (car args)))