diff options
| author | Chong Yidong | 2012-04-17 13:58:34 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-04-17 13:58:34 +0800 |
| commit | 21ffa320b1ff22f00a927261348517acd37ab790 (patch) | |
| tree | db468ffe8bf42f77d79f1191f3ac24c0d9f302ef | |
| parent | f0f6bc351ba0e4a9ba5a62fb1bbc6fe4b5ce2e0c (diff) | |
| download | emacs-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/ChangeLog | 7 | ||||
| -rw-r--r-- | doc/lispref/help.texi | 15 | ||||
| -rw-r--r-- | doc/lispref/keymaps.texi | 13 |
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 @@ | |||
| 1 | 2012-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 | |||
| 1 | 2012-04-16 Glenn Morris <rgm@gnu.org> | 8 | 2012-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 | |||
| 348 | replaces them by what they stand for, returning the result as a string. | 348 | replaces them by what they stand for, returning the result as a string. |
| 349 | This permits display of documentation that refers accurately to the | 349 | This permits display of documentation that refers accurately to the |
| 350 | user's own customized key bindings. | 350 | user's own customized key bindings. |
| 351 | |||
| 352 | @cindex advertised binding | ||
| 353 | If a command has multiple bindings, this function normally uses the | ||
| 354 | first one it finds. You can specify one particular key binding by | ||
| 355 | assigning an @code{:advertised-binding} symbol property to the | ||
| 356 | command, like this: | ||
| 357 | |||
| 358 | @smallexample | ||
| 359 | (put 'undo :advertised-binding [?\C-/]) | ||
| 360 | @end smallexample | ||
| 361 | |||
| 362 | @noindent | ||
| 363 | The @code{:advertised-binding} property also affects the binding shown | ||
| 364 | in menu items (@pxref{Menu Bar}). The property is ignored if it | ||
| 365 | specifies 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 | |||
| 2549 | convenient hint for users who do not know the key binding. If a | 2549 | convenient hint for users who do not know the key binding. If a |
| 2550 | command has multiple bindings, Emacs normally displays the first one | 2550 | command has multiple bindings, Emacs normally displays the first one |
| 2551 | it finds. You can specify one particular key binding by assigning an | 2551 | it 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 |
| 2553 | instance, the following tells Emacs to show @kbd{C-/} for the | 2553 | in Documentation}. |
| 2554 | @code{undo} menu item: | ||
| 2555 | |||
| 2556 | @smallexample | ||
| 2557 | (put 'undo :advertised-binding [?\C-/]) | ||
| 2558 | @end smallexample | ||
| 2559 | |||
| 2560 | @noindent | ||
| 2561 | If the @code{:advertised-binding} property specifies a key binding | ||
| 2562 | that 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 |