Subject: bug#50067: Context menus

From: Juri Linkov <[email-masked]>
Date: Wed, 25 Aug 2021 20:45:20 +0300

> * flyspell menu
>
> It is handy to show 'flyspell-correct-word when click on typo word.
> However, menu is embedded inside of pre existing
> 'flyspell-correct-word and it is hard to collect menu.  Since
> popup-menu interface can accept both menu and function with `e', it's
> good to utilize 'flyspell-correct-word.
>
> How about something like below to interrupt evaluation of
> context-menu-functions in the middle when one of
> context-menu-functions returns symbol instead of menu?

Thanks, adapting flyspell to use the context menu is our next priority.
But it seems interrupting evaluation is too hackish solution, and it still
uses x-popup-menu.  Would it be possible for flyspell to put its context
function to the end of context-menu-functions, and then replace all
previously added menus with own menu that contains word corrections?