If we came to the end, add the parent in PREV. */
if (! CONSP (list) || EQ (Qkeymap, XCONS (list)->car))
{
+ /* If we already have the right parent, return now
+ so that we avoid the loops below. */
+ if (EQ (XCONS (prev)->cdr, parent))
+ return parent;
+
XCONS (prev)->cdr = parent;
break;
}
else
parent_entry = Qnil;
+ /* If MAP's parent has something other than a keymap,
+ our own submap shadows it completely, so use nil as SUBMAP's parent. */
+ if (! (CONSP (parent_entry) && EQ (XCONS (parent_entry)->car, Qkeymap)))
+ parent_entry = Qnil;
+
if (! EQ (parent_entry, submap))
Fset_keymap_parent (submap, parent_entry);
}
Fcons (Fmake_vector (make_number (0400), Qnil), Qnil));
Fset (intern ("global-map"), global_map);
+ current_global_map = global_map;
+ staticpro (&global_map);
+ staticpro (¤t_global_map);
+
meta_map = Fmake_keymap (Qnil);
Fset (intern ("esc-map"), meta_map);
Ffset (intern ("ESC-prefix"), meta_map);
"Local keymap for minibuffer input with completion, for exact match.");
Vminibuffer_local_must_match_map = Fmake_sparse_keymap (Qnil);
- current_global_map = global_map;
-
DEFVAR_LISP ("minor-mode-map-alist", &Vminor_mode_map_alist,
"Alist of keymaps to use for minor modes.\n\
Each element looks like (VARIABLE . KEYMAP); KEYMAP is used to read\n\