From: uzibalqa <uzibalqa@proton.me>
To: Drew Adams <drew.adams@oracle.com>
Cc: Eli Zaretskii <eliz@gnu.org>,
"help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: RE: [External] : Re: Making new menu after Tools using keymap-set-after
Date: Tue, 18 Jul 2023 20:55:50 +0000 [thread overview]
Message-ID: <octSwRUBGATodT8vVKkAdfb7gmEGbfB-NxH2R1WFXHNdyJIM6oY4Ciui5BUD8nE9ZRZqxfNPNYEA2u3OfFRTDHs-ALJe14uXpf158wTqLcY=@proton.me> (raw)
In-Reply-To: <SJ0PR10MB5488ED7B0903C78C37821FCDF338A@SJ0PR10MB5488.namprd10.prod.outlook.com>
------- Original Message -------
On Wednesday, July 19th, 2023 at 8:42 AM, Drew Adams <drew.adams@oracle.com> wrote:
> Caveat: I'm not really following this thread in detail.
>
> OP: I think (among other things perhaps) you are
> looking for an example of using `keymap-set-after'. If so, I see two examples where` keymap-set-after'
> is presented, in (elisp) `Modifying Menus':
> ___
>
> Here is an example:
>
> (keymap-set-after my-menu "<drink>"
>
> '("Drink" . drink-command) 'eat)
>
> makes a binding for the fake function key <DRINK> and puts it right
>
> after the binding for <EAT>.
The declaration is making things much more complicated because we were just
using a vector [menu-bar mcp-topm]. Now it is characters with angled brackets
such as "<menu-bar mcp-topm>" rather than conforming with previous define-key-after way.
More torture.
>
> Here is how to insert an item called ‘Work’ in the ‘Signals’ menu
> of Shell mode, after the item ‘break’:
>
> (keymap-set-after shell-mode-map "<menu-bar> <signals> <work>"
>
> '("Work" . work-command) 'break)
> ___
>
> This node of the manual comes after nodes that
> specify defining menus in general.
> ___
>
> BTW, Eli, isn't `define-key' here a typo - shouldn't it be` keymap-set':
>
> When you insert a new item in an existing menu,
> you probably want to put it in a particular
> place among the menu’s existing items. If you use
> ‘define-key’ to add the item, it normally goes at
> ^^^^^^^^^^
> the front of the menu. To put it elsewhere in the
> menu, use ‘keymap-set-after’:
>
> I expect that the contrast to be made there is
> between `keymap-set' and` keymap-set-after',
> not between `define-key' and` keymap-set-after'.
next prev parent reply other threads:[~2023-07-18 20:55 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-18 16:04 Making new menu after Tools using keymap-set-after uzibalqa
2023-07-18 16:29 ` Eli Zaretskii
2023-07-18 16:56 ` uzibalqa
2023-07-18 17:12 ` Eli Zaretskii
2023-07-18 17:29 ` uzibalqa
2023-07-18 18:28 ` Eli Zaretskii
2023-07-18 18:45 ` uzibalqa
2023-07-18 19:02 ` Eli Zaretskii
2023-07-18 19:26 ` uzibalqa
2023-07-19 2:25 ` Eli Zaretskii
2023-07-19 8:08 ` uzibalqa
2023-07-19 9:10 ` Robert Pluim
2023-07-19 15:58 ` uzibalqa
2023-07-19 16:33 ` Eli Zaretskii
2023-07-19 16:37 ` uzibalqa
2023-07-19 16:44 ` Robert Pluim
2023-07-19 16:54 ` uzibalqa
2023-07-19 17:07 ` Robert Pluim
2023-07-19 17:11 ` uzibalqa
2023-07-19 17:25 ` Platon Pronko
2023-07-19 17:34 ` uzibalqa
2023-07-20 3:17 ` Platon Pronko
2023-07-19 17:28 ` [External] : " Drew Adams
2023-07-19 17:37 ` uzibalqa
2023-07-19 19:00 ` Drew Adams
2023-07-19 19:08 ` uzibalqa
2023-07-20 3:32 ` Platon Pronko
2023-07-20 8:43 ` uzibalqa
2023-07-19 21:00 ` uzibalqa
2023-07-18 20:42 ` [External] : " Drew Adams
2023-07-18 20:55 ` uzibalqa [this message]
2023-07-18 21:40 ` uzibalqa
2023-07-19 12:11 ` Eli Zaretskii
2023-07-19 11:58 ` Eli Zaretskii
2023-07-19 14:18 ` Drew Adams
2023-07-18 20:49 ` uzibalqa
2023-07-19 12:00 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='octSwRUBGATodT8vVKkAdfb7gmEGbfB-NxH2R1WFXHNdyJIM6oY4Ciui5BUD8nE9ZRZqxfNPNYEA2u3OfFRTDHs-ALJe14uXpf158wTqLcY=@proton.me' \
--to=uzibalqa@proton.me \
--cc=drew.adams@oracle.com \
--cc=eliz@gnu.org \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.