aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2012-04-17 13:58:34 +0800
committerChong Yidong2012-04-17 13:58:34 +0800
commit21ffa320b1ff22f00a927261348517acd37ab790 (patch)
treedb468ffe8bf42f77d79f1191f3ac24c0d9f302ef
parentf0f6bc351ba0e4a9ba5a62fb1bbc6fe4b5ce2e0c (diff)
downloademacs-21ffa320b1ff22f00a927261348517acd37ab790.tar.gz
emacs-21ffa320b1ff22f00a927261348517acd37ab790.zip
Improve description of :advertised-binding in Lisp manual.
* doc/lispref/keymaps.texi (Menu Bar): Move most of the :advertised-binding description to help.texi. * doc/lispref/help.texi (Keys in Documentation): Mention :advertised-binding.
-rw-r--r--doc/lispref/ChangeLog7
-rw-r--r--doc/lispref/help.texi15
-rw-r--r--doc/lispref/keymaps.texi13
3 files changed, 24 insertions, 11 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index d20c4d19c3a..16a0696b9f9 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,10 @@
12012-04-17 Chong Yidong <cyd@gnu.org>
2
3 * help.texi (Keys in Documentation): Mention :advertised-binding.
4
5 * keymaps.texi (Menu Bar): Move most of the :advertised-binding
6 description to help.texi.
7
12012-04-16 Glenn Morris <rgm@gnu.org> 82012-04-16 Glenn Morris <rgm@gnu.org>
2 9
3 * processes.texi (Process Information, Input to Processes) 10 * processes.texi (Process Information, Input to Processes)
diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi
index 2575f5e5bd6..627197f09f1 100644
--- a/doc/lispref/help.texi
+++ b/doc/lispref/help.texi
@@ -348,6 +348,21 @@ This function scans @var{string} for the above special sequences and
348replaces them by what they stand for, returning the result as a string. 348replaces them by what they stand for, returning the result as a string.
349This permits display of documentation that refers accurately to the 349This permits display of documentation that refers accurately to the
350user's own customized key bindings. 350user's own customized key bindings.
351
352@cindex advertised binding
353If a command has multiple bindings, this function normally uses the
354first one it finds. You can specify one particular key binding by
355assigning an @code{:advertised-binding} symbol property to the
356command, like this:
357
358@smallexample
359(put 'undo :advertised-binding [?\C-/])
360@end smallexample
361
362@noindent
363The @code{:advertised-binding} property also affects the binding shown
364in menu items (@pxref{Menu Bar}). The property is ignored if it
365specifies a key binding that the command does not actually have.
351@end defun 366@end defun
352 367
353 Here are examples of the special sequences: 368 Here are examples of the special sequences:
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi
index 65666217e16..f1d4690d470 100644
--- a/doc/lispref/keymaps.texi
+++ b/doc/lispref/keymaps.texi
@@ -2549,17 +2549,8 @@ the same command (if such a key binding exists). This serves as a
2549convenient hint for users who do not know the key binding. If a 2549convenient hint for users who do not know the key binding. If a
2550command has multiple bindings, Emacs normally displays the first one 2550command has multiple bindings, Emacs normally displays the first one
2551it finds. You can specify one particular key binding by assigning an 2551it finds. You can specify one particular key binding by assigning an
2552@code{:advertised-binding} symbol property to the command. For 2552@code{:advertised-binding} symbol property to the command. @xref{Keys
2553instance, the following tells Emacs to show @kbd{C-/} for the 2553in Documentation}.
2554@code{undo} menu item:
2555
2556@smallexample
2557(put 'undo :advertised-binding [?\C-/])
2558@end smallexample
2559
2560@noindent
2561If the @code{:advertised-binding} property specifies a key binding
2562that the command does not actually have, it is ignored.
2563 2554
2564@node Tool Bar 2555@node Tool Bar
2565@subsection Tool bars 2556@subsection Tool bars