summaryrefslogtreecommitdiff
path: root/src/doc.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2005-02-15 06:36:17 +0000
committerRichard M. Stallman <rms@gnu.org>2005-02-15 06:36:17 +0000
commite679a3c1d50168cffb09f8a8f9128f8fdc07b355 (patch)
tree33c3ba766dadb1f68f0bf719fd61e6fc6ef2668e /src/doc.c
parent7a7df7ac8f5dbe0cfe36578bc5bac3032f634e48 (diff)
downloademacs-e679a3c1d50168cffb09f8a8f9128f8fdc07b355.tar.gz
(Fsubstitute_command_keys): Compute list of shadowing maps
for describe_map_tree. Pass 1 for MENTION_SHADOWS.
Diffstat (limited to 'src/doc.c')
-rw-r--r--src/doc.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/doc.c b/src/doc.c
index f306caed36a..0d1ab394647 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -882,6 +882,9 @@ thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ int
{
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 @@ thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ int
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);