diff options
| author | Richard M. Stallman | 1998-02-11 01:51:36 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-02-11 01:51:36 +0000 |
| commit | e4b6f8e3fdbb743d4e8e170a402ae3c25234263e (patch) | |
| tree | 2b7e59e8ac2bb4b2c37bb66b80c83abcc6c391e7 /src | |
| parent | a249d3a05a82cc8f09ac4493e3e80b660af0ccb4 (diff) | |
| download | emacs-e4b6f8e3fdbb743d4e8e170a402ae3c25234263e.tar.gz emacs-e4b6f8e3fdbb743d4e8e170a402ae3c25234263e.zip | |
(describe_map_tree): Add the maps we have already
handled into SUB_SHADOWS.
Diffstat (limited to 'src')
| -rw-r--r-- | src/keymap.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/keymap.c b/src/keymap.c index 4e8259fde2f..94188044d12 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -2386,7 +2386,7 @@ describe_map_tree (startmap, partial, shadow, prefix, title, nomenu, transl, | |||
| 2386 | int transl; | 2386 | int transl; |
| 2387 | int always_title; | 2387 | int always_title; |
| 2388 | { | 2388 | { |
| 2389 | Lisp_Object maps, seen, sub_shadows; | 2389 | Lisp_Object maps, orig_maps, seen, sub_shadows; |
| 2390 | struct gcpro gcpro1, gcpro2, gcpro3; | 2390 | struct gcpro gcpro1, gcpro2, gcpro3; |
| 2391 | int something = 0; | 2391 | int something = 0; |
| 2392 | char *key_heading | 2392 | char *key_heading |
| @@ -2394,7 +2394,7 @@ describe_map_tree (startmap, partial, shadow, prefix, title, nomenu, transl, | |||
| 2394 | key binding\n\ | 2394 | key binding\n\ |
| 2395 | --- -------\n"; | 2395 | --- -------\n"; |
| 2396 | 2396 | ||
| 2397 | maps = Faccessible_keymaps (startmap, prefix); | 2397 | orig_maps = maps = Faccessible_keymaps (startmap, prefix); |
| 2398 | seen = Qnil; | 2398 | seen = Qnil; |
| 2399 | sub_shadows = Qnil; | 2399 | sub_shadows = Qnil; |
| 2400 | GCPRO3 (maps, seen, sub_shadows); | 2400 | GCPRO3 (maps, seen, sub_shadows); |
| @@ -2475,7 +2475,16 @@ key binding\n\ | |||
| 2475 | sub_shadows = Fcons (shmap, sub_shadows); | 2475 | sub_shadows = Fcons (shmap, sub_shadows); |
| 2476 | } | 2476 | } |
| 2477 | 2477 | ||
| 2478 | describe_map (Fcdr (elt), Fcar (elt), | 2478 | /* Maps we have already listed in this loop shadow this map. */ |
| 2479 | for (tail = orig_maps; ! EQ (tail, maps); tail = XCDR (tail)) | ||
| 2480 | { | ||
| 2481 | Lisp_Object tem; | ||
| 2482 | tem = Fequal (Fcar (XCAR (tail)), prefix); | ||
| 2483 | if (! NILP (tem)) | ||
| 2484 | sub_shadows = Fcons (XCDR (XCAR (tail)), sub_shadows); | ||
| 2485 | } | ||
| 2486 | |||
| 2487 | describe_map (Fcdr (elt), prefix, | ||
| 2479 | transl ? describe_translation : describe_command, | 2488 | transl ? describe_translation : describe_command, |
| 2480 | partial, sub_shadows, &seen, nomenu); | 2489 | partial, sub_shadows, &seen, nomenu); |
| 2481 | 2490 | ||