hlissner/emacs-company-dict

`company-dict` does not pass control to next backend when it can't do completion

Closed this issue · 1 comments

‘prefix’: The backend should return the text to be completed. It must be
text immediately before point. Returning nil from this command passes
control to the next backend. The function should return ‘stop’ if it
should complete but cannot (e.g. when in the middle of a symbol).
Instead of a string, the backend may return a cons (PREFIX . LENGTH)
where LENGTH is a number used in place of PREFIX’s length when
comparing against ‘company-minimum-prefix-length’. LENGTH can also
be just t, and in the latter case the test automatically succeeds.

Hi, when there's not dictionary item can be used as candidate, company-dict seems not pass control to next backend. Or am I missing something here? Thanks.

Sorry for this tremendously late reply. company-dict's prefix looks like this:

  (let ((dicts (company-dict--relevant-dicts)))
;; ... snip ...
      (prefix          (and dicts (company-grab-symbol)))

This should return nil if no relevant dicts are available (and there's nothing to complete at point). So it should behave as you expect.