Subject: bug#50067: Context menus

From: Tak Kunihiro <[email-masked]>
Date: Sat, 21 Aug 2021 15:33:36 +0900

** context-menu-region

All commands belong to `Edit' in menu bar.
I think `context-menu-edit' sounds better.

Isn't it better to use `menu-bar-edit-menu' as a source rather than
create a menu from scratch?

On paste when there is a region and delete-selection-mode is t, the
region should be replaced by the text.

** no multiple horizontal lines

Sometimes I see double lines on the context menu.  I think that there is
no useful case to have double lines.  To allow only one horizontal line
would look cool.

** reuse existing menu

I cannot figure out how to include pre-existing menu such for
(mouse-buffer-menu-map).  To lean how to manipulate menu is not easy.
It's nice to have an example something like below (does not work).

  (defun context-menu-buffer (menu)
  "Add a buffer menu entry to MENU."
    (let ((map (mouse-buffer-menu-map)))
      (define-key-after menu [buffer] map))
    menu)