# HG changeset patch # User Richard M. Stallman # Date 1108449377 0 # Node ID 42e18861b7b836584f55c0526f2242ccbb3ad7d4 # Parent 896e880eab56dacd5b5a7c1a73dbbd56968a7fe5 (Fsubstitute_command_keys): Compute list of shadowing maps for describe_map_tree. Pass 1 for MENTION_SHADOWS. diff -r 896e880eab56 -r 42e18861b7b8 src/doc.c --- a/src/doc.c Tue Feb 15 06:33:15 2005 +0000 +++ b/src/doc.c Tue Feb 15 06:36:17 2005 +0000 @@ -882,6 +882,9 @@ { struct buffer *oldbuf; int start_idx; + /* This is for computing the SHADOWS arg for describe_map_tree. */ + Lisp_Object active_maps = Fcurrent_active_maps (Qnil); + Lisp_Object earlier_maps; changed = 1; strp += 2; /* skip \{ or \< */ @@ -932,7 +935,13 @@ else if (start[-1] == '<') keymap = tem; else - describe_map_tree (tem, 1, Qnil, Qnil, (char *)0, 1, 0, 0); + { + /* Get the list of active keymaps that precede this one. + If this one's not active, get nil. */ + earlier_maps = Fcdr (Fmemq (tem, Freverse (active_maps))); + describe_map_tree (tem, 1, Fnreverse (earlier_maps), + Qnil, (char *)0, 1, 0, 0, 1); + } tem = Fbuffer_string (); Ferase_buffer (); set_buffer_internal (oldbuf);