30.4 Abbrevs Suggestions

You can get abbrev suggestions when you manually type text for which there is currently an active defined abbrev. For example, if there is an abbrev ‘foo’ with the expansion ‘find outer otter’, and you manually type ‘find outer otter’, Emacs can notice this and show a hint in the echo area when you have stopped typing.

To enable the abbrev suggestion feature, customize the option abbrev-suggest to a non-nil value.

The variable abbrev-suggest-hint-threshold controls when to suggest an abbrev to the user. This variable defines the minimum savings (in terms of the number of characters the user will not have to type) required for Emacs to suggest using an abbrev. For example, if the user types ‘foo bar’ (seven characters) and there is an abbrev ‘fubar’ defined (five characters), the user will not get any suggestion unless the threshold is set to the number 2 or lower. With the default value 3, the user would not get any suggestion in this example, because the savings in using the abbrev are below the threshold. If you always want to get abbrev suggestions, set this variable’s value to zero.

The command abbrev-suggest-show-report displays a buffer with all the abbrev suggestions shown during the current editing session. This can be useful if you get several abbrev suggestions and don’t remember them all.