|
| From: | Dmitry Gutov |
| Subject: | Re: Turning completion table lambdas into symbols |
| Date: | Wed, 29 Nov 2023 01:51:12 +0200 |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 |
On 29/11/2023 01:36, Spencer Baugh wrote:
If there was a canonical way for a completion table to maintain some state which*doesn't* require the completion table to be a lambda, I think most completion tables could become defuns instead of lambdas. (And then they could be customized based on the function symbol)
Maybe take a look at how company-capf caches the results of calling a CAPF function?
Depending on the data, the cache key is either buffer/point/chars-modified-tick tuple, or the "completion session" (but in a company-mode specific way).
For CAPF and Company, we also discussed the idea of a "session object" some time ago, but that's not in the current API so far.
| [Prev in Thread] | Current Thread | [Next in Thread] |