diff src/doc.c @ 5784:9c3be8e0d2ef

(Fsubstitute_command_keys): Pass keymap as that arg to Fwhere_is_internal. Init keymap from Voverriding_local_map.
author Richard M. Stallman <rms@gnu.org>
date Fri, 04 Feb 1994 23:09:25 +0000
parents 9e8bbed9a9b6
children 8b3f54fb451f
line wrap: on
line diff
--- a/src/doc.c	Fri Feb 04 23:01:27 1994 +0000
+++ b/src/doc.c	Fri Feb 04 23:09:25 1994 +0000
@@ -37,6 +37,8 @@
 
 Lisp_Object Vdoc_file_name;
 
+extern Lisp_Object Voverriding_local_map;
+
 Lisp_Object
 get_doc_string (filepos)
      long filepos;
@@ -391,7 +393,11 @@
   name = Qnil;
   GCPRO4 (str, tem, keymap, name);
 
-  keymap = current_buffer->keymap;
+  /* KEYMAP is either nil (which means search all the active keymaps)
+     or a specified local map (which means search just that and the
+     global map).  If non-nil, it might come from Voverriding_local_map,
+     or from a \\<mapname> construct in STR itself..  */
+  keymap = Voverriding_local_map;
 
   bsize = XSTRING (str)->size;
   bufp = buf = (unsigned char *) xmalloc (bsize);
@@ -425,7 +431,7 @@
 	  /* Save STRP in IDX.  */
 	  idx = strp - (unsigned char *) XSTRING (str)->data;
 	  tem = Fintern (make_string (start, length), Qnil);
-	  tem = Fwhere_is_internal (tem, keymap, Qnil, Qt, Qnil);
+	  tem = Fwhere_is_internal (tem, keymap, Qt, Qnil);
 
 	  /* Disregard menu bar bindings; it is positively annoying to
 	     mention them when there's no menu bar, and it isn't terribly