aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Love2000-09-04 14:00:05 +0000
committerDave Love2000-09-04 14:00:05 +0000
commitb08d86c6ef96379a081411dba6400f2de0c7f2e9 (patch)
tree7d33856cc48280a7f572b55e5910066b4da8c397
parente3b9fc9196ffcde45fed8d4c4a66d5b95fe78f7e (diff)
downloademacs-b08d86c6ef96379a081411dba6400f2de0c7f2e9.tar.gz
emacs-b08d86c6ef96379a081411dba6400f2de0c7f2e9.zip
help-echo and menu prompts stuff
-rw-r--r--lispref/keymaps.texi37
1 files changed, 22 insertions, 15 deletions
diff --git a/lispref/keymaps.texi b/lispref/keymaps.texi
index 68749792c49..0498dd12fdd 100644
--- a/lispref/keymaps.texi
+++ b/lispref/keymaps.texi
@@ -1,6 +1,6 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1998, 1999 3@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1998, 1999, 2000
4@c Free Software Foundation, Inc. 4@c Free Software Foundation, Inc.
5@c See the file elisp.texi for copying conditions. 5@c See the file elisp.texi for copying conditions.
6@setfilename ../info/keymaps 6@setfilename ../info/keymaps
@@ -228,7 +228,7 @@ to @code{nil}, and does not bind any other kind of event.
228@end example 228@end example
229 229
230If you specify @var{prompt}, that becomes the overall prompt string for 230If you specify @var{prompt}, that becomes the overall prompt string for
231the keymap. The prompt string is useful for menu keymaps 231the keymap. The prompt string should be provided for menu keymaps
232(@pxref{Defining Menus}). 232(@pxref{Defining Menus}).
233@end defun 233@end defun
234 234
@@ -474,7 +474,7 @@ its value. But if @var{mapvar} is non-@code{nil}, it sets @var{mapvar}
474as a variable instead. 474as a variable instead.
475 475
476If @var{prompt} is non-@code{nil}, that becomes the overall prompt 476If @var{prompt} is non-@code{nil}, that becomes the overall prompt
477string for the keymap. The prompt string is useful for menu keymaps 477string for the keymap. The prompt string should be given for menu keymaps
478(@pxref{Defining Menus}). 478(@pxref{Defining Menus}).
479@end defun 479@end defun
480 480
@@ -1527,13 +1527,15 @@ A keymap is suitable for menu use if it has an @dfn{overall prompt
1527string}, which is a string that appears as an element of the keymap. 1527string}, which is a string that appears as an element of the keymap.
1528(@xref{Format of Keymaps}.) The string should describe the purpose of 1528(@xref{Format of Keymaps}.) The string should describe the purpose of
1529the menu's commands. Emacs displays the overall prompt string as the 1529the menu's commands. Emacs displays the overall prompt string as the
1530menu title in some cases, depending on which toolkit is used for 1530menu title in some cases, depending on the toolkit (if any) used for
1531displaying menus. Keyboard menus also display the overall prompt 1531displaying menus.@footnote{It is required for menus which do not use a
1532string. 1532toolkit, e.g.@: under MS-DOS.} Keyboard menus also display the overall
1533prompt string.
1533 1534
1534The easiest way to construct a keymap with a prompt string is to specify 1535The easiest way to construct a keymap with a prompt string is to specify
1535the string as an argument when you call @code{make-keymap} or 1536the string as an argument when you call @code{make-keymap},
1536@code{make-sparse-keymap} (@pxref{Creating Keymaps}). 1537@code{make-sparse-keymap} or @code{define-prefix-command}
1538(@pxref{Creating Keymaps}).
1537 1539
1538The order of items in the menu is the same as the order of bindings in 1540The order of items in the menu is the same as the order of bindings in
1539the keymap. Since @code{define-key} puts new bindings at the front, you 1541the keymap. Since @code{define-key} puts new bindings at the front, you
@@ -1570,11 +1572,12 @@ describe the action of the command it corresponds to.
1570You can also supply a second string, called the help string, as follows: 1572You can also supply a second string, called the help string, as follows:
1571 1573
1572@example 1574@example
1573(@var{item-string} @var{help-string} . @var{real-binding}) 1575(@var{item-string} @var{help} . @var{real-binding})
1574@end example 1576@end example
1575 1577
1576@var{help-string} specifies a ``help-echo'' string to display while the 1578@var{help} specifies a ``help-echo'' string to display while the mouse
1577mouse is on that item. 1579is on that item in the same way as @code{help-echo} text properties
1580(@pxref{Help display}).
1578 1581
1579As far as @code{define-key} is concerned, @var{item-string} and 1582As far as @code{define-key} is concerned, @var{item-string} and
1580@var{help-string} are part of the event's binding. However, 1583@var{help-string} are part of the event's binding. However,
@@ -1657,8 +1660,11 @@ does not appear, then the menu is displayed as if this item were
1657not defined at all. 1660not defined at all.
1658 1661
1659@item :help @var{help} 1662@item :help @var{help}
1660The value of this property, @var{help}, is the ``help-echo'' string to 1663The value of this property, @var{help}, specifies a ``help-echo'' string
1661display while the mouse is on that item. 1664to display while the mouse is on that item. This is displayed in the
1665same way as @code{help-echo} text properties (@pxref{Help display}).
1666Note that this must be a constant string, unlike the @code{help-echo}
1667property for text and overlays.
1662 1668
1663@item :button (@var{type} . @var{selected}) 1669@item :button (@var{type} . @var{selected})
1664This property provides a way to define radio buttons and toggle buttons. 1670This property provides a way to define radio buttons and toggle buttons.
@@ -2124,8 +2130,9 @@ tool bar bindings and have their normal meanings. The @var{real-binding}
2124in the item must be a command, not a keymap; in other words, it does not 2130in the item must be a command, not a keymap; in other words, it does not
2125work to define a tool bar icon as a prefix key. 2131work to define a tool bar icon as a prefix key.
2126 2132
2127 The @code{:help} property is meaningful, and specifies a ``help-echo'' 2133 The @code{:help} property specifies a ``help-echo'' string to display
2128string to display while the mouse is on that item. 2134while the mouse is on that item. This is displayed in the same way as
2135@code{help-echo} text properties (@pxref{Help display}).
2129 2136
2130 In addition, you should use the @code{:image} property; 2137 In addition, you should use the @code{:image} property;
2131this is how you specify the image to display in the tool bar: 2138this is how you specify the image to display in the tool bar: