emacs-devel
[Top][All Lists]
Advanced

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

Re: What happened to the key-menu patch?


From: Stefan Monnier
Subject: Re: What happened to the key-menu patch?
Date: Fri, 12 Jul 2002 14:07:52 -0400

>       Also what about merging
>     `menu-item's ?
> 
> As far as I know, there is no reason ever to do this.  If you find two
> menu items in scanning one keymap, the first should shadow the second.

That's true for "leaf" menu-items but for menu-items corresponding to
prefix keys (i.e. submenus), there keymaps carried by the two menu-items
are merged.

>     What do you mean by "ignore" ?
>     Does that mean that if I do
> 
>           (let ((map (make-spase-keymap)))
>             (set-keymap-marent map global-map)
>             (define-key map "\C-x" (make-sparse-keymap)))
> 
>     I'might never see any of the C-x bindings in `global-map' ?
> 
> That's correct.  I believe that read-key-sequence using this map
> won't see them either.

Nope.  When looking up C-x, fix_submap_inheritance will end up doing
the equivalent of (set-keymap-parent .. (lookup-key "\C-x" global-map))
to the subkeymap built by the second `make-sparse-keymap).

It's the whole reason why fix_submap_inheritance was reason as
a matter of fact.


        Stefan




reply via email to

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