/* This is really the value. */
return object;
- /* If the keymap contents looks like (keymap ...) or (lambda ...)
- then use itself. */
- else if (EQ (XCAR (object), Qkeymap) || EQ (XCAR (object), Qlambda))
- return object;
-
/* If the keymap contents looks like (menu-item name . DEFN)
or (menu-item name DEFN ...) then use DEFN.
This is a new format menu item. */
Keymap alist elements like (CHAR MENUSTRING . DEFN)
will be used by HierarKey menus. */
else if (STRINGP (XCAR (object)))
- {
- object = XCDR (object);
- /* Also remove a menu help string, if any,
- following the menu item name. */
- if (CONSP (object) && STRINGP (XCAR (object)))
- object = XCDR (object);
- /* Also remove the sublist that caches key equivalences, if any. */
- if (CONSP (object) && CONSP (XCAR (object)))
- {
- Lisp_Object carcar;
- carcar = XCAR (XCAR (object));
- if (NILP (carcar) || VECTORP (carcar))
- object = XCDR (object);
- }
- }
+ object = XCDR (object);
- /* If the contents are (KEYMAP . ELEMENT), go indirect. */
- else if (KEYMAPP (XCAR (object)))
- error ("Wow, indirect keymap entry!!");
else
return object;
}
if (CONSP (tem) && EQ (XCAR (tem), Qkeymap))
XSETCAR (elt, Fcopy_keymap (tem));
tem = XCDR (elt);
- if (CONSP (tem) && CONSP (XCAR (tem)))
- /* Delete cache for key equivalences. */
- XSETCDR (elt, XCDR (tem));
}
}
else
elt = XCDR (elt);
tem = XCDR (elt);
}
- /* There may also be a list that caches key equivalences.
- Just delete it for the new keymap. */
- if (CONSP (tem)
- && CONSP (XCAR (tem))
- && (NILP (XCAR (XCAR (tem)))
- || VECTORP (XCAR (XCAR (tem)))))
- {
- XSETCDR (elt, XCDR (tem));
- tem = XCDR (tem);
- }
if (CONSP (tem) && EQ (XCAR (tem), Qkeymap))
XSETCDR (elt, Fcopy_keymap (tem));
}
c = reorder_modifiers (c);
keystring = concat2 (build_string (new_mods), XCDR (assoc));
- error ((modifiers & ~meta_modifier
- ? "To bind the key %s, use [?%s], not [%s]"
- : "To bind the key %s, use \"%s\", not [%s]"),
+ error ("To bind the key %s, use [?%s], not [%s]",
SDATA (SYMBOL_NAME (c)), SDATA (keystring),
SDATA (SYMBOL_NAME (c)));
}
static void
accessible_keymaps_1 (Lisp_Object key, Lisp_Object cmd, Lisp_Object args, void *data)
-/* Use void* data to be compatible with map_keymap_function_t. */
+/* Use void * data to be compatible with map_keymap_function_t. */
{
struct accessible_keymaps_data *d = data; /* Cast! */
Lisp_Object maps = d->maps;
that use the modifier key specified in `where-is-preferred-modifier'
\(or their meta variants) and entirely reject menu bindings.
-If optional 4th arg NOINDIRECT is non-nil, don't follow indirections
-to other keymaps or slots. This makes it possible to search for an
-indirect definition itself.
+If optional 4th arg NOINDIRECT is non-nil, don't extract the commands inside
+menu-items. This makes it possible to search for a menu-item itself.
The optional 5th arg NO-REMAP alters how command remapping is handled: