|
From: | Juri Linkov |
Subject: | bug#62250: 29.0.60; Allow context menu from text properties to not override everything |
Date: | Sat, 18 Mar 2023 20:08:34 +0200 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) |
> It would be nice if the context menu defined by a text property had the > option of adding to instead of overriding the menu specified by > `context-menu-functions'. > > I think this can be done in a backwards-compatible way as follows: > > (defun context-menu-map (&optional click) > ... > When there is a text property `context-menu-function' at CLICK, it is > handled as if it were the first entry of `context-menu-functions'. I already envisioned such request, so the text property is named `context-menu-function' (singular). As an improvement we could add another text property `context-menu-functions' (plural) that will play more nicely with the variable `context-menu-functions'. For example, we could append the list from the text property to the value of the variable before running `run-hook-wrapped' on the composite list.
[Prev in Thread] | Current Thread | [Next in Thread] |