[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: M-g in dired
From: |
Juri Linkov |
Subject: |
Re: M-g in dired |
Date: |
Mon, 07 Nov 2005 16:27:11 +0200 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
> `shadow_lookup' iterates over two maps (dired and global) and calls
> `Flookup_key' on them. When `Flookup_key' returns 1 for the key
> "M-gn" on the dired map, the loop in `shadow_lookup' skips it
>
> That's the place that has to be changed.
>
> When this call to `Flookup_key' returns a number N, `shadow_lookup'
> should look up a sub-key-sequence of the first N events. If that
> returns non-nil, the longer key is shadowed, so don't mention it at all.
> If that returns non-nil, the longer key is not shadowed.
This is what I considered initially as one variant, but wanted to make
the returned value of `Flookup_key' more useful. If this is not needed,
then the patch below changes only `shadow_lookup'. I tested it, and
it works.
Index: src/keymap.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/keymap.c,v
retrieving revision 1.307
diff -c -r1.307 keymap.c
*** src/keymap.c 12 Sep 2005 10:26:35 -0000 1.307
--- src/keymap.c 7 Nov 2005 14:17:55 -0000
***************
*** 2377,2383 ****
for (tail = shadow; CONSP (tail); tail = XCDR (tail))
{
value = Flookup_key (XCAR (tail), key, flag);
! if (!NILP (value) && !NATNUMP (value))
return value;
}
return Qnil;
--- 2377,2389 ----
for (tail = shadow; CONSP (tail); tail = XCDR (tail))
{
value = Flookup_key (XCAR (tail), key, flag);
! if (NATNUMP (value))
! {
! value = Flookup_key (XCAR (tail), Fsubstring (key, 0, value), flag);
! if (!NILP (value))
! return Qnil;
! }
! else if (!NILP (value))
return value;
}
return Qnil;
--
Juri Linkov
http://www.jurta.org/emacs/
- Re: M-g in dired, (continued)
- Re: M-g in dired, Andreas Schwab, 2005/11/01
- Re: M-g in dired, Richard M. Stallman, 2005/11/02
- Re: M-g in dired, Juri Linkov, 2005/11/03
- Re: M-g in dired, Stefan Monnier, 2005/11/03
- Re: M-g in dired, Juri Linkov, 2005/11/04
- Re: M-g in dired, Richard M. Stallman, 2005/11/04
- Re: M-g in dired, Juri Linkov, 2005/11/05
- Re: M-g in dired, Richard M. Stallman, 2005/11/05
- Re: M-g in dired,
Juri Linkov <=
- Re: M-g in dired, Stefan Monnier, 2005/11/07
- Re: M-g in dired, Juri Linkov, 2005/11/08
- Re: M-g in dired, Richard M. Stallman, 2005/11/08
- Re: M-g in dired, Richard M. Stallman, 2005/11/07
- Re: M-g in dired, Richard M. Stallman, 2005/11/03