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: Lars Ingebrigtsen
Subject: Re: master 859190f 2/3: Convert some keymaps to defvar-keymap
Date: Thu, 14 Oct 2021 22:43:04 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Oh, yeah, I had totally forgotten that this is how menus are defined.
> To it's ambiguous here -- the thing in [] could be anything, including
> [s], which kdb would interpret as the key "s".
>
> This form is limited to menu items, though, so perhaps it could be made
> to work (i.e., if the DEF is a menu item, then we have different logic).

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.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

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