Subject: bug#18265: 24.3.92; lisp-completion-at-point should return nil in comments, unless after `

From: Stefan Monnier <[email-masked]>
Date: Fri, 15 Aug 2014 08:33:59 -0400

> Sometimes the user makes an explicit request, though. So it's "idle mode vs
> manual mode", not "Company vs complete-symbol".

That's right.

> Still, the fact that user called `M-x company-complete' inside a comment
> doesn't tell me that they actually want to see completions from
> `company-capf' and not some other backend like `company-dabbrev'.

Indeed, but it does say that it's better to return some completion table
than none.  We'd want the lisp-completion-at-point to use something like
the ":exclusive no" property (or maybe a new ":merge-with-rest") in
this case.

> Likewise, user pressing C-M-i inside a comment might prefer not to talk
> `lisp-completion-at-point', but some other completion function that goes
> after it that's more suited for completion in comments.

As it currently stands, there's no question that your original request
is right (the one stated in the "Subject:"), so feel free to fix it.

I'm just thinking of how we could also satisfy those who might want to
complete code-like things in comments, without having to resort
to customization.

        Stefan