comparison lispref/keymaps.texi @ 51921:86bdb37c1d71

(Functions for Key Lookup): Add current-active-maps. (Scanning Keymaps): Add map-keymaps. (Defining Menus): Add keymap-prompt.
author Richard M. Stallman <rms@gnu.org>
date Mon, 14 Jul 2003 16:03:04 +0000
parents 23a1cea22d13
children e8156132db3d
comparison
equal deleted inserted replaced
51920:8177e11a3638 51921:86bdb37c1d71
935 @result{} find-file 935 @result{} find-file
936 @end group 936 @end group
937 @end example 937 @end example
938 @end defun 938 @end defun
939 939
940 @defun current-active-maps
941 This returns the list of keymaps that would be used by the command
942 loop in the current circumstances to look up a key sequence.
943 @end defun
944
940 @defun local-key-binding key &optional accept-defaults 945 @defun local-key-binding key &optional accept-defaults
941 This function returns the binding for @var{key} in the current 946 This function returns the binding for @var{key} in the current
942 local keymap, or @code{nil} if it is undefined there. 947 local keymap, or @code{nil} if it is undefined there.
943 948
944 @c Emacs 19 feature 949 @c Emacs 19 feature
1471 1476
1472 @noindent 1477 @noindent
1473 These are not all the keymaps you would see in actuality. 1478 These are not all the keymaps you would see in actuality.
1474 @end defun 1479 @end defun
1475 1480
1481 @defun map-keymap function keymap
1482 The function @code{map-keymap} calls @var{function} once
1483 for each binding in @var{keymap}. It passes two arguments,
1484 the event type and the value of the binding. If @var{keymap}
1485 has a parent, the parent's bindings are included as well.
1486
1487 This function is the cleanest way to examine all the bindings
1488 in a keymap.
1489 @end defun
1490
1476 @defun where-is-internal command &optional keymap firstonly noindirect 1491 @defun where-is-internal command &optional keymap firstonly noindirect
1477 This function is a subroutine used by the @code{where-is} command 1492 This function is a subroutine used by the @code{where-is} command
1478 (@pxref{Help, , Help, emacs,The GNU Emacs Manual}). It returns a list 1493 (@pxref{Help, , Help, emacs,The GNU Emacs Manual}). It returns a list
1479 of key sequences (of any length) that are bound to @var{command} in a 1494 of key sequences (of any length) that are bound to @var{command} in a
1480 set of keymaps. 1495 set of keymaps.
1570 1585
1571 The easiest way to construct a keymap with a prompt string is to specify 1586 The easiest way to construct a keymap with a prompt string is to specify
1572 the string as an argument when you call @code{make-keymap}, 1587 the string as an argument when you call @code{make-keymap},
1573 @code{make-sparse-keymap} or @code{define-prefix-command} 1588 @code{make-sparse-keymap} or @code{define-prefix-command}
1574 (@pxref{Creating Keymaps}). 1589 (@pxref{Creating Keymaps}).
1590
1591 @defun keymap-prompt keymap
1592 This function returns the overall prompt string of @var{keymap},
1593 or @code{nil} if it has none.
1594 @end defun
1575 1595
1576 The order of items in the menu is the same as the order of bindings in 1596 The order of items in the menu is the same as the order of bindings in
1577 the keymap. Since @code{define-key} puts new bindings at the front, you 1597 the keymap. Since @code{define-key} puts new bindings at the front, you
1578 should define the menu items starting at the bottom of the menu and 1598 should define the menu items starting at the bottom of the menu and
1579 moving to the top, if you care about the order. When you add an item to 1599 moving to the top, if you care about the order. When you add an item to