emacs-devel
[Top][All Lists]
Advanced

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

Re: Abbrev suggestions - feedback appreciated


From: Mathias Dahl
Subject: Re: Abbrev suggestions - feedback appreciated
Date: Sun, 17 Sep 2017 23:56:49 +0200

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.

My simple function `asug-get-previous-words' function performs quite well,
it seems. I could not get `looking-back' to work across lines. It was very quick
though, when words was on the same line.

Also, collecting all active abbrev expansions was also very fast (1000 runs
takes 0.1 on my not very hot PC) so I did not bother with that optimization. But
perhaps I will experiment a bit with that too.

All in all this seems to turn out quite nicely. I will try to integrate it properly in
abbrev.el and add some option there to toggle this feature on.

Thanks for the pointers!





reply via email to

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