>> I already envisioned such request > > All right. Just for the record, this would be useful to create a > context menu for images. The patch below will allow using the text property like 'context-menu-functions '(image-context-menu) > Also, I could take advantage of it to slightly > simplify the context menu of jit-spell. Actually, flyspell was the reason why the text property `context-menu-function' overrides everything: 1. `make-flyspell-overlay' puts an overlay property (overlay-put overlay 'context-menu-function 'flyspell-context-menu) 2. `flyspell-context-menu' returns `flyspell-correct-word' 3. `context-menu-map' should return this symbol unmodified 4. at the end, the symbol `flyspell-correct-word' is executed as a command from the menu binding in `context-menu-entry' or from `context-menu-open': (if (commandp map) (call-interactively map)