[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: poplife-mode
From: |
Tak Kunihiro |
Subject: |
Re: poplife-mode |
Date: |
Wed, 15 Nov 2017 08:26:12 +0900 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (windows-nt) |
> You can incorporate any existing menus you want, with `mouse3.el'.
>
> See how the current major-mode menu is incorporated, for example.
> Or the menu-bar menus (all of them, under a menu `Menu Bar', when
> the menu-bar itself is not visible).
>
> To incorporate an existing menu, all you need is its keymap.
I want to pop a keymap that is created dynamically such for directory
listing. To do so, functions that return keymap should be evaluated
sequentially.
I think IO of a function for context menu should accept event and return
a keymap or nil. As a result, a function that returns context-menu
would be written like below.
(global-set-key [mouse-3] 'context-menu)
(defun context-menu (event)
(interactive "e")
(or (poplife-mouse-file-menu event) ; FILE menu
(poplife-mouse-dir-menu event) ; DIR menu
(poplife-mouse-ispell-menu event) ; iSpell menu
(poplife-mouse-url-menu event) ; URL menu
(mouse3-region-menu event) ; region menu
(mouse3-noregion-menu event))) ; default menu
- Re: poplife-mode, (continued)
- Re: poplife-mode, Stefan Monnier, 2017/11/12
- Re: poplife-mode, Charles A. Roelli, 2017/11/12
- Re: poplife-mode, Tak Kunihiro, 2017/11/13
- RE: poplife-mode, Drew Adams, 2017/11/13
- Re: poplife-mode, Tak Kunihiro, 2017/11/13
- RE: poplife-mode, Drew Adams, 2017/11/13
- Re: poplife-mode,
Tak Kunihiro <=
- RE: poplife-mode, Drew Adams, 2017/11/14
- RE: poplife-mode, Drew Adams, 2017/11/12
- RE: poplife-mode, Drew Adams, 2017/11/12
- Re: poplife-mode, Stefan Monnier, 2017/11/12
- RE: poplife-mode, Drew Adams, 2017/11/13
- Re: poplife-mode, Stefan Monnier, 2017/11/13
- RE: poplife-mode, Drew Adams, 2017/11/13
- Re: poplife-mode, Stefan Monnier, 2017/11/13
- RE: poplife-mode, Drew Adams, 2017/11/13
- Re: poplife-mode, Stefan Monnier, 2017/11/13