[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r99414: Try and fix bug#788, hopefull
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r99414: Try and fix bug#788, hopefully for real this time. |
Date: |
Sun, 24 Jan 2010 21:52:03 -0500 |
User-agent: |
Bazaar (2.0.2) |
------------------------------------------------------------
revno: 99414 [merge]
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Sun 2010-01-24 21:52:03 -0500
message:
Try and fix bug#788, hopefully for real this time.
modified:
.bzrignore
src/ChangeLog
src/keymap.c
=== modified file '.bzrignore'
--- a/.bzrignore 2010-01-12 23:55:23 +0000
+++ b/.bzrignore 2010-01-24 08:42:22 +0000
@@ -61,3 +61,4 @@
src/stamp-oldxmenu
src/temacs
src/deps
+configure.lineno
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2010-01-24 23:03:13 +0000
+++ b/src/ChangeLog 2010-01-25 02:52:03 +0000
@@ -1,3 +1,12 @@
+2010-01-24 Stefan Monnier <address@hidden>
+
+ Try and fix bug#788, hopefully for real this time.
+ * keymap.c (shadow_lookup): Add `remap' arg.
+ (describe_map, describe_vector): Update calls to shadow_lookup.
+ (Fwhere_is_internal): Fix up handling of `remapped_sequences' and
+ `remapped' so this flag is applicable to `sequence'. Be careful to
+ perform remapping during shadow_lookup check of remapped_sequences.
+
2010-01-24 Eric BĂ©langer <address@hidden> (tiny change)
* image.c (png_load): Use png_sig_cmp instead of the obsolete
=== modified file 'src/keymap.c'
--- a/src/keymap.c 2010-01-13 08:35:10 +0000
+++ b/src/keymap.c 2010-01-24 08:42:22 +0000
@@ -2650,11 +2650,13 @@
Lisp_Object args, void *data));
/* Like Flookup_key, but uses a list of keymaps SHADOW instead of a single map.
- Returns the first non-nil binding found in any of those maps. */
+ Returns the first non-nil binding found in any of those maps.
+ If REMAP is true, pass the result of the lookup through command
+ remapping before returning it. */
static Lisp_Object
-shadow_lookup (shadow, key, flag)
- Lisp_Object shadow, key, flag;
+shadow_lookup (Lisp_Object shadow, Lisp_Object key, Lisp_Object flag,
+ int remap)
{
Lisp_Object tail, value;
@@ -2669,7 +2671,15 @@
return Qnil;
}
else if (!NILP (value))
- return value;
+ {
+ Lisp_Object remapping;
+ if (remap && SYMBOLP (value)
+ && (remapping = Fcommand_remapping (value, Qnil, shadow),
+ !NILP (remapping)))
+ return remapping;
+ else
+ return value;
+ }
}
return Qnil;
}
@@ -2860,30 +2870,30 @@
{
/* We have a list of advertized bindings. */
while (CONSP (tem))
- if (EQ (shadow_lookup (keymaps, XCAR (tem), Qnil), definition))
+ if (EQ (shadow_lookup (keymaps, XCAR (tem), Qnil, 0), definition))
return XCAR (tem);
else
tem = XCDR (tem);
- if (EQ (shadow_lookup (keymaps, tem, Qnil), definition))
+ if (EQ (shadow_lookup (keymaps, tem, Qnil, 0), definition))
return tem;
}
sequences = Freverse (where_is_internal (definition, keymaps,
!NILP (noindirect), nomenus));
- while (CONSP (sequences))
+ while (CONSP (sequences)
+ /* If we're at the end of the `sequences' list and we haven't
+ considered remapped sequences yet, copy them over and
+ process them. */
+ || (!remapped && (sequences = remapped_sequences,
+ remapped = 1),
+ CONSP (sequences)))
{
Lisp_Object sequence, function;
sequence = XCAR (sequences);
sequences = XCDR (sequences);
- if (NILP (sequences) && !remapped)
- {
- sequences = remapped_sequences;
- remapped = 1;
- }
-
/* Verify that this key binding is not shadowed by another
binding for the same key, before we say it exists.
@@ -2893,7 +2903,8 @@
Either nil or number as value from Flookup_key
means undefined. */
- if (!EQ (shadow_lookup (keymaps, sequence, Qnil), definition))
+ if (!EQ (shadow_lookup (keymaps, sequence, Qnil, remapped),
+ definition))
continue;
/* If the current sequence is a command remapping with
@@ -3506,7 +3517,7 @@
ASET (kludge, 0, event);
if (!NILP (shadow))
{
- tem = shadow_lookup (shadow, kludge, Qt);
+ tem = shadow_lookup (shadow, kludge, Qt, 0);
if (!NILP (tem))
{
/* If both bindings are keymaps, this key is a prefix key,
@@ -3776,7 +3787,7 @@
{
Lisp_Object tem;
- tem = shadow_lookup (shadow, kludge, Qt);
+ tem = shadow_lookup (shadow, kludge, Qt, 0);
if (!NILP (tem))
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r99414: Try and fix bug#788, hopefully for real this time.,
Stefan Monnier <=