Function: map-keymap

map-keymap is a function defined in keymap.c.

Signature

(map-keymap FUNCTION KEYMAP)

Documentation

Call FUNCTION once for each event binding in KEYMAP.

FUNCTION is called with two arguments: the event that is bound, and the definition it is bound to. The event may be a character range.

If KEYMAP has a parent, the parent's bindings are included as well. This works recursively: if the parent has itself a parent, then the grandparent's bindings are also included and so on.

For more information, see Info node (elisp) Keymaps.

View in manual

Probably introduced at or before Emacs version 22.1.

Aliases

cl-map-keymap (obsolete since 24.3)

Source Code

// Defined in /usr/src/emacs/src/keymap.c
{
  if (! NILP (sort_first))
    return call2 (intern ("map-keymap-sorted"), function, keymap);

  map_keymap (keymap, map_keymap_call, function, NULL, 1);
  return Qnil;
}