bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#62250: 29.0.60; Allow context menu from text properties to not overr


From: Juri Linkov
Subject: bug#62250: 29.0.60; Allow context menu from text properties to not override everything
Date: Mon, 20 Mar 2023 20:34:59 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

>> The patch below will allow using the text property like
>>
>>   'context-menu-functions '(image-context-menu)
>
> I didn't test the patch (I don't understand click events very well), but
> does it find the context-menu-functions property of overlays as well?

It should be able to find the property in overlays as well.

> And would those override the context-menu-functions text property or get
> merged?

This needs confirming, but I guess overlays take priority over text properties.

>>        (run-hook-wrapped 'context-menu-functions
>>                          (lambda (fun)
>>                            (setq menu (funcall fun menu click))
>> -                          nil)))
>> +                          nil))
>> +      (dolist (fun funs)
>> +        (setq menu (funcall fun menu click))))
>>  
>>      ;; Remove duplicate separators as well as ones at the beginning or
>>      ;; end of the menu.
>
> I believe this makes the menu entries coming from a text property appear
> after the regular hook ones, while I would expect the opposite (stuff
> specific to the point is more "urgent").

When text properties are processed later, they have a chance to decide
where they add their menu items: at the top of the context menu, at the
bottom, or anywhere in the middle.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]