We need unbind function (was Re: [PATCHES] awaiting...)
On Sun, May 23, 2004 at 01:05:59PM -0400, David Yitzchak Cohen wrote:
> On Sun, May 23, 2004 at 12:33:46PM EDT, Nicolas Rachinsky wrote:
> > * TAKAHASHI Tamotsu <ttakah@xxxxxxxxxxxxxxxxx> [2004-05-23 20:27 +0900]:
> > > Date: Thu, 20 May 2004 12:33:44 +0900
>
> > > --- keymap.c~ Wed May 19 23:46:11 2004
> > > +++ keymap.c Thu May 20 12:15:32 2004
> > > @@ -443,6 +443,9 @@
> > > if (LastKey != map->keys[pos])
> > > return (retry_generic (menu, map->keys, pos, LastKey));
> > >
> > > + if (map->op == OP_NULL)
> > > + return (retry_generic (menu, map->keys, pos, LastKey));
> > > +
> > > if (++pos == map->len)
> > > {
> >
> > Wouldn't this remove the ability to disable an entry from generic in a
> > specific menu?
Yes, this removes the ability. That's one of solutions for bug#1880.
Search for "noop" in manual.txt. The manual says that
"The special function noop unbinds the specified key sequence."
And it DOES NOT say "noop for index disables an entry from generic
in index menu." So, I think "noop" should not disable, but unbind, keys.
So, this won't be a bug if this is included in mutt. But....,
> > bind generic f something
> > bind index f noop
> >
> > to bind f to something everywhere except in the index.
>
> Wasn't this discussed a year or two ago, with a resulting patch to
> implement unbind and fix the bind documentation to reflect current
> behavior? I suppose that other patch never made it into CVS, causing
> this patch to come up now ;-/
I've forgotten the discussion. Thanks for reminding me.
Now I know, as Nicolas said, we need both "bind noop" and "unbind".
So, Forget (the "unbind" part of) my patch.
Get the unbind patch from http://home.uchicago.edu/~dgc/mutt/ .
I don't close 1880 until the unbind patch (or mine) is included in cvs.
bug#1880 is really a bug.
Thanks,
--
tamo