[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Abbrev suggestions - feedback appreciated

From: Stefan Monnier
Subject: Re: Abbrev suggestions - feedback appreciated
Date: Sun, 17 Sep 2017 17:23:24 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

>> You could avoid constructing the list by passing `word` to
>> absug-get-active-abbrev-expansions and have it check equality as it
>> goes.
> That's a good optimization, thanks! At least as long as I am not trying
> to tackle multi-word expansions. In that case, I don't know on
> beforehand how many words to match. Again, surely possible to
> solve... One way might be to save not one but, say, ten previous words,
> and send that in to the function that will look for expansions matching
> that. It would of course break on eleven words and above...
> Any clever ideas?

Actually, my "clever" idea was that you don't read any word at all: just
go though the existing abbreviations, and check for each one of the if
the text before point matches the expansion.

Admittedly, I don't think we currently have a fast implementation of the
equivalent of (looking-back (regexp-quote expansion)), so I don't know
how well it will perform.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]