[Top][All Lists]

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

Re: Context menus and mouse-3 [was: Changes for emacs 28]

From: Tak Kunihiro
Subject: Re: Context menus and mouse-3 [was: Changes for emacs 28]
Date: Sat, 19 Sep 2020 17:02:01 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin)

I think framework of context menu should be provided by Emacs,
as suggested three years ago by Stefan.


I propose a system something like below.

A list for menu candidates is defined in advance.  After first one is
evaluated, then it returns menu or nil.  When it is menu, we pop menu
up.  When it is nil, the second one is evaluated.  The last one should
always return menu.

(defvar mouse-context-menu-functions
  '(mouse-help-menu             ; HELP menu
    mouse-info-menu             ; INFO menu
    mouse-file-menu             ; FILE menu
    mouse-dir-menu              ; DIR menu
    mouse-word-menu             ; WORD menu
    mouse-url-menu              ; URL menu
    menu-bar-edit-menu          ; EDIT menu (default))
  "Function that builds the context-menu.
Takes one argument (the EVENT that requests the menu) and should return
a list of menu items or nil")

reply via email to

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