* keymap.c (describe_map): Avoid generating duplicate entries if
authorChong Yidong <cyd@stupidchicken.com>
Wed, 10 May 2006 03:32:06 +0000 (03:32 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Wed, 10 May 2006 03:32:06 +0000 (03:32 +0000)
the shadowed binding has the same definition.

src/ChangeLog
src/keymap.c

index 89147db..7a5c3c7 100644 (file)
@@ -1,3 +1,8 @@
+2006-05-09  Chong Yidong  <cyd@stupidchicken.com>
+
+       * keymap.c (describe_map): Avoid generating duplicate entries if
+       the shadowed binding has the same definition.
+
 2006-05-09  Kenichi Handa  <handa@m17n.org>
 
        * keymap.c (push_key_description): Handle invalid character key.
index c8158a3..ecc2f7b 100644 (file)
@@ -3297,7 +3297,9 @@ describe_map (map, prefix, elt_describer, partial, shadow,
              tem = shadow_lookup (shadow, kludge, Qt);
              if (!NILP (tem))
                {
-                 if (mention_shadow)
+                 /* Avoid generating duplicate entries if the
+                    shadowed binding has the same definition. */
+                 if (mention_shadow && !EQ (tem, definition))
                    this_shadowed = 1;
                  else
                    continue;