Subject: bug#50067: Context menus

From: Lars Ingebrigtsen <[email-masked]>
Date: Sun, 15 Aug 2021 13:56:01 +0200

Juri Linkov <[email-masked]> writes:

> The branch 'feature/context-menu' is ready for merging to master.
>
> It was created after the discussion in
> https://lists.gnu.org/archive/html/emacs-devel/2021-07/msg00300.html
> as a proof-of-concept.
>
> And after testing with different modes, it proved to be flexible enough
> to support various needs.
>
> After merging it could be improved further with more development in master.

I haven't tested the branch, but reading the diff, it looks like an
excellent feature to me.  Looking at the implementation of the stuff in
various modes, I'm wondering whether the interface should perhaps be
tweaked a bit:

+(defun eww-context-menu (menu)
[...]
+  (when (or (mouse-posn-property (event-start last-input-event) 'shr-url)
+            (mouse-posn-property (event-start last-input-event) 'image-url))
+    (define-key menu [shr-mouse-browse-url-new-window]

Perhaps the signature of the context menu functions should be:

+(defun eww-context-menu (menu event)

?

I'm also wondering whether we should add a `context-menu' text property.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no