emacs-devel
[Top][All Lists]
Advanced

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

Re: master 859190f 2/3: Convert some keymaps to defvar-keymap


From: Stefan Kangas
Subject: Re: master 859190f 2/3: Convert some keymaps to defvar-keymap
Date: Thu, 14 Oct 2021 13:58:15 -0700

Lars Ingebrigtsen <larsi@gnus.org> writes:

> No, this is valid code:
>
> (local-set-key "f"
>       '(menu-item "Create Named Stash" vc-git-stash
>                 :help "Create named stash"))
>
> It's a very odd way to call `vc-git-stash', but it's possible, I guess.
>
> So the [f] syntax would be ambiguous.
>
> (local-set-key [f]
>       '(menu-item "Create Named Stash" vc-git-stash
>                 :help "Create named stash"))
>
> currently doesn't set any keys, but if we interpret [f] as a kbd
> sequence, it would bind the `f' key.  So this syntax might not fly.

I imagine that this would be a new function, so in that case it seems to
me that backwards compatibility is not a concern.  Are you also
discussing a new function here?

On another note, I find it weird that we can bind keys to menu-items,
but that is the only way to get at some functionality.  This should
probably be fixed.

On a third note, why don't we just provide a better interface for
creating menu items that is not based on pretending that a menu item
like a key?  Do we need to leak that implementation detail for some
didactic reason, or something?



reply via email to

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