help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Making new menu after Tools using keymap-set-after


From: uzibalqa
Subject: Re: Making new menu after Tools using keymap-set-after
Date: Tue, 18 Jul 2023 18:45:15 +0000

------- Original Message -------
On Wednesday, July 19th, 2023 at 6:28 AM, Eli Zaretskii <eliz@gnu.org> wrote:


> > Date: Tue, 18 Jul 2023 17:29:05 +0000
> > From: uzibalqa uzibalqa@proton.me
> > Cc: help-gnu-emacs@gnu.org
> > 
> > > > It is all very good, but how do I make a new menu after tools ?
> > > > Documentation just states that key is just a string, but is this so ?
> > > 
> > > No, it says it's a string that key-valid-p will accept, and you can
> > > find further documentation in key-valid-p.
> > 
> > Are we going to continue like this forever ? Now it is 'key-valid-p'.
> > You want people to change, yet making it extremely hard to follow.
> 
> 
> You keep asking questions, so I try to answer them. If that is not
> helpful, I can shut up.
> 
> > The question is specific, how do I make a new menu after tools using
> > 'keymap-set-after'. Should be two lines of code at most, am I right ?
> 
> 
> I don't know how many lines of code is that, because I don't know what
> you want to do. And please don't expect me to "help" you by writing
> your code instead of yourself.

I knew I was right about this.  You are not willing to write the code needed to 
make a new menu that I can use.  You want me to bugger off and figure it out.
That's just not on.

-------------

This is what I want people to do

The reference manual already has "23.17.4 Menu Example" on how to make a new
menu in menubar.

The example uses "define-key" but never discussed about "define-key-after".
The use of "define-key-after" should also be part of the example.  Starting
with a call to "define-key-after", followed by "define-key" for the menu items.
The making of submenus should also be included.

Now that "define-key-after" and "define-key" are to be considered legacy 
functions,
change the "Menu Example" to use the new recommended functions 
'keymap-set-after' and
'keymap-set'.

Finally remove the example from the 'Reference Manual' and introduce it in the 
'Introduction to Programming in Emacs Lisp'.  Then add more details about "Cons 
Cells",
"Dotted Notation" and "Backquote Construct" as well.











reply via email to

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