emacs-devel
[Top][All Lists]
Advanced

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

Re: M-g in dired


From: Stefan Monnier
Subject: Re: M-g in dired
Date: Mon, 07 Nov 2005 11:03:21 -0500
User-agent: Gnus/5.11 (Gnus v5.11) 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.

A compomise might be to return 1 for (lookup-key map [e1 e2 e3]) if [e1 e2] is
bound to a command, and to return -1 if [e1] is bound to a prefix key
and [e1 e2] is not bound to anything.

Callers might need to be updated but a quick `abs' is all it takes to
recover the current info.


        Stefan




reply via email to

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