|
From: | Stefan Monnier |
Subject: | Re: Context menus and mouse-3 |
Date: | Sun, 18 Jul 2021 11:53:50 -0400 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> The idea is to define a variable (something like below; > poplife-menu-candidates) with list of functions that returns nil or > keymap (something like below; poplife-mouse-word-menu). A function > (something like below; poplife-context-menu) will test each of them > until it gets keymap. Note: such a variable should have a name that ends in `-hook` or `-functions` and should be manipulated with the usual hook functions, e.g. `run-hook-wrapped`. Note also that the `context-menu-function` already mentioned offers the same kind of functionality (except you need to use `add-function` instead of `add-hook` and it offers a bit more flexibility at the cost of extra work). Stefan
[Prev in Thread] | Current Thread | [Next in Thread] |