# HG changeset patch # User Richard M. Stallman # Date 887161896 0 # Node ID 4aeabf3b8f9841fa88c49b734ad8ecbfd10377ca # Parent 6566e48896f44bb4570aa556338d439dd95361d8 (describe_map_tree): Add the maps we have already handled into SUB_SHADOWS. diff -r 6566e48896f4 -r 4aeabf3b8f98 src/keymap.c --- a/src/keymap.c Wed Feb 11 00:29:47 1998 +0000 +++ b/src/keymap.c Wed Feb 11 01:51:36 1998 +0000 @@ -2386,7 +2386,7 @@ int transl; int always_title; { - Lisp_Object maps, seen, sub_shadows; + Lisp_Object maps, orig_maps, seen, sub_shadows; struct gcpro gcpro1, gcpro2, gcpro3; int something = 0; char *key_heading @@ -2394,7 +2394,7 @@ key binding\n\ --- -------\n"; - maps = Faccessible_keymaps (startmap, prefix); + orig_maps = maps = Faccessible_keymaps (startmap, prefix); seen = Qnil; sub_shadows = Qnil; GCPRO3 (maps, seen, sub_shadows); @@ -2475,7 +2475,16 @@ sub_shadows = Fcons (shmap, sub_shadows); } - describe_map (Fcdr (elt), Fcar (elt), + /* Maps we have already listed in this loop shadow this map. */ + for (tail = orig_maps; ! EQ (tail, maps); tail = XCDR (tail)) + { + Lisp_Object tem; + tem = Fequal (Fcar (XCAR (tail)), prefix); + if (! NILP (tem)) + sub_shadows = Fcons (XCDR (XCAR (tail)), sub_shadows); + } + + describe_map (Fcdr (elt), prefix, transl ? describe_translation : describe_command, partial, sub_shadows, &seen, nomenu);