comparison 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
comparison
equal deleted inserted replaced
5783:6a97e54241a3 5784:9c3be8e0d2ef
34 #include "lisp.h" 34 #include "lisp.h"
35 #include "buffer.h" 35 #include "buffer.h"
36 #include "keyboard.h" 36 #include "keyboard.h"
37 37
38 Lisp_Object Vdoc_file_name; 38 Lisp_Object Vdoc_file_name;
39
40 extern Lisp_Object Voverriding_local_map;
39 41
40 Lisp_Object 42 Lisp_Object
41 get_doc_string (filepos) 43 get_doc_string (filepos)
42 long filepos; 44 long filepos;
43 { 45 {
389 tem = Qnil; 391 tem = Qnil;
390 keymap = Qnil; 392 keymap = Qnil;
391 name = Qnil; 393 name = Qnil;
392 GCPRO4 (str, tem, keymap, name); 394 GCPRO4 (str, tem, keymap, name);
393 395
394 keymap = current_buffer->keymap; 396 /* KEYMAP is either nil (which means search all the active keymaps)
397 or a specified local map (which means search just that and the
398 global map). If non-nil, it might come from Voverriding_local_map,
399 or from a \\<mapname> construct in STR itself.. */
400 keymap = Voverriding_local_map;
395 401
396 bsize = XSTRING (str)->size; 402 bsize = XSTRING (str)->size;
397 bufp = buf = (unsigned char *) xmalloc (bsize); 403 bufp = buf = (unsigned char *) xmalloc (bsize);
398 404
399 strp = (unsigned char *) XSTRING (str)->data; 405 strp = (unsigned char *) XSTRING (str)->data;
423 strp++; /* skip ] */ 429 strp++; /* skip ] */
424 430
425 /* Save STRP in IDX. */ 431 /* Save STRP in IDX. */
426 idx = strp - (unsigned char *) XSTRING (str)->data; 432 idx = strp - (unsigned char *) XSTRING (str)->data;
427 tem = Fintern (make_string (start, length), Qnil); 433 tem = Fintern (make_string (start, length), Qnil);
428 tem = Fwhere_is_internal (tem, keymap, Qnil, Qt, Qnil); 434 tem = Fwhere_is_internal (tem, keymap, Qt, Qnil);
429 435
430 /* Disregard menu bar bindings; it is positively annoying to 436 /* Disregard menu bar bindings; it is positively annoying to
431 mention them when there's no menu bar, and it isn't terribly 437 mention them when there's no menu bar, and it isn't terribly
432 useful even when there is a menu bar. */ 438 useful even when there is a menu bar. */
433 if (!NILP (tem)) 439 if (!NILP (tem))