[Top][All Lists]

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

Re: What happened to the key-menu patch?

From: Miles Bader
Subject: Re: What happened to the key-menu patch?
Date: 10 Jul 2002 11:43:55 +0900

"Stefan Monnier" <monnier+gnu/address@hidden> writes:
> > sure if it's worth it to add a `dobindings' macro or not.
> Agreed.  There's already a `loop' macro for it in CL.

Yeah, but we don't really like cl in emacs, remember?  Oh wait, you do.

> >      key-description list' is, but it's something like (meta control x).
> >      I guess this is a canonical format for key names in xemacs, but it
> >      doesn't appear to be so in emacs, so I'm not sure how that argument
> >      should be handled (perhaps just punt, and pass whatever's stored in
> >      the keymap).
> I don't think we should try to re-create the XEmacs (meta control x) form
> from our M-C-x symbols.  We could provide an additional compatibility layer
> on top of it, if it proves useful/necessary later on.

So, just pass whatever's stored in the keymap directly?

> >  (2) How are menu entries handled with this?
> As for how we should treat them, I think we should not do anything
> special with them: i.e. `function' will be called with key `menu-bar'
> and with the corresponding sub-keymap as the binding.

That would be consistent with `lookup-key', but it also throws out
a bunch of useful information for menu-entries -- in particular, the
very information that I want for the key-menus!

How about just passing something similar to the corresponding arguments
to define-key, e.g., for keys, `function' would be the function, but
for menu-entries, it would be the whole (menu-item ...) list.

Either way, we have to provide some other sort of function to allow
easily going from one form to the other -- if we just pass the
function/sub-keymap, there needs to be a way for the user to lookup all
the menu-item information, and if we pass the (menu-item...) list
directly, there should probably be some access function(s) to make
getting at the various pieces cleanly.

Perhaps the thing to do is to pass only the function/sub-keymap by
default, but have an optional argument that says `pass all menu info for
menu-items'; this could possible be combined with Richard's suggestion
of having an option to suppress passing menu-items altogether.

We could (rather, should) add a similar optional argument to
`lookup-key' for conistency and utility.

Is it true that nothing can be known?  If so how do we know this?  -Woody Allen

reply via email to

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