diff options
| author | Eli Zaretskii | 2001-09-08 17:50:08 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2001-09-08 17:50:08 +0000 |
| commit | 7f0afecc0da3bb37efdc3f3f200ca0332a59b3b7 (patch) | |
| tree | 3aa6c9bf6099b4e6c464d8df87c02494647892c6 | |
| parent | a2f2ceaaf7d48d2be32aaab4a58ef27636803250 (diff) | |
| download | emacs-7f0afecc0da3bb37efdc3f3f200ca0332a59b3b7.tar.gz emacs-7f0afecc0da3bb37efdc3f3f200ca0332a59b3b7.zip | |
(Describing Characters) <single-key-description>:
Document the new argument no-angles.
(Accessing Documentation) <documentation-property>: Document that
a non-string property is evaluated.
<documentation>: Document that the function-documentation property
is looked for.
| -rw-r--r-- | lispref/help.texi | 37 |
1 files changed, 29 insertions, 8 deletions
diff --git a/lispref/help.texi b/lispref/help.texi index eeb8d998755..a601825d053 100644 --- a/lispref/help.texi +++ b/lispref/help.texi | |||
| @@ -111,7 +111,9 @@ This function returns the documentation string that is recorded | |||
| 111 | in @var{symbol}'s property list under property @var{property}. It | 111 | in @var{symbol}'s property list under property @var{property}. It |
| 112 | retrieves the text from a file if necessary, and runs | 112 | retrieves the text from a file if necessary, and runs |
| 113 | @code{substitute-command-keys} to substitute actual key bindings. (This | 113 | @code{substitute-command-keys} to substitute actual key bindings. (This |
| 114 | substitution is not done if @var{verbatim} is non-@code{nil}.) | 114 | substitution is not done if @var{verbatim} is non-@code{nil}.) If |
| 115 | @var{property} isn't a string and doesn't refer to the documentation | ||
| 116 | file @file{etc/DOC}, it is evaluated to obtain a string. | ||
| 115 | 117 | ||
| 116 | @smallexample | 118 | @smallexample |
| 117 | @group | 119 | @group |
| @@ -127,10 +129,15 @@ substitution is not done if @var{verbatim} is non-@code{nil}.) | |||
| 127 | @end defun | 129 | @end defun |
| 128 | 130 | ||
| 129 | @defun documentation function &optional verbatim | 131 | @defun documentation function &optional verbatim |
| 130 | This function returns the documentation string of @var{function}. It | 132 | This function returns the documentation string of @var{function}. If |
| 131 | reads the text from a file if necessary. Then (unless @var{verbatim} is | 133 | @var{function} is a symbol, this function looks for a |
| 132 | non-@code{nil}) it calls @code{substitute-command-keys}, to return a | 134 | @code{function-documentation'} property of that symbol; if it has a |
| 133 | value containing the actual (current) key bindings. | 135 | non-@code{nil} value, the documentation is taken from that value (if |
| 136 | the value is not a string, it is evaluated). Alternatively, | ||
| 137 | @code{documentation} reads the text from a file if necessary. Then | ||
| 138 | (unless @var{verbatim} is non-@code{nil}) it calls | ||
| 139 | @code{substitute-command-keys}, to return a value containing the | ||
| 140 | actual (current) key bindings. | ||
| 134 | 141 | ||
| 135 | The function @code{documentation} signals a @code{void-function} error | 142 | The function @code{documentation} signals a @code{void-function} error |
| 136 | if @var{function} has no function definition. However, it is OK if | 143 | if @var{function} has no function definition. However, it is OK if |
| @@ -369,7 +376,7 @@ about valid events. See also the examples for | |||
| 369 | @code{single-key-description}, below. | 376 | @code{single-key-description}, below. |
| 370 | @end defun | 377 | @end defun |
| 371 | 378 | ||
| 372 | @defun single-key-description event | 379 | @defun single-key-description event &optional no-angles |
| 373 | @cindex event printing | 380 | @cindex event printing |
| 374 | @cindex character printing | 381 | @cindex character printing |
| 375 | @cindex control character printing | 382 | @cindex control character printing |
| @@ -379,8 +386,14 @@ Emacs notation for keyboard input. A normal printing character appears | |||
| 379 | as itself, but a control character turns into a string starting with | 386 | as itself, but a control character turns into a string starting with |
| 380 | @samp{C-}, a meta character turns into a string starting with @samp{M-}, | 387 | @samp{C-}, a meta character turns into a string starting with @samp{M-}, |
| 381 | and space, tab, etc.@: appear as @samp{SPC}, @samp{TAB}, etc. A | 388 | and space, tab, etc.@: appear as @samp{SPC}, @samp{TAB}, etc. A |
| 382 | function key symbol appears as itself. An event that is a list appears | 389 | function key symbol appears as itsels, but inside angle brackets |
| 383 | as the name of the symbol in the @sc{car} of the list. | 390 | @samp{<>}. An event that is a list appears as the name of the symbol |
| 391 | in the @sc{car} of the list, inside angle brackets. | ||
| 392 | |||
| 393 | If the optional argument @var{no-angles} is non-@code{nil}, the angle | ||
| 394 | brackets around function keys and event symbols are omitted; this is | ||
| 395 | for compatibility with old versions of Emacs which didn't print the | ||
| 396 | brackets. | ||
| 384 | 397 | ||
| 385 | @smallexample | 398 | @smallexample |
| 386 | @group | 399 | @group |
| @@ -392,7 +405,15 @@ as the name of the symbol in the @sc{car} of the list. | |||
| 392 | @result{} "C-x SPC M-y SPC C-j SPC TAB SPC RET SPC C-l 1 2 3" | 405 | @result{} "C-x SPC M-y SPC C-j SPC TAB SPC RET SPC C-l 1 2 3" |
| 393 | @end group | 406 | @end group |
| 394 | @group | 407 | @group |
| 408 | (single-key-description 'delete) | ||
| 409 | @result{} "<delete>" | ||
| 410 | @end group | ||
| 411 | @group | ||
| 395 | (single-key-description 'C-mouse-1) | 412 | (single-key-description 'C-mouse-1) |
| 413 | @result{} "<C-mouse-1>" | ||
| 414 | @end group | ||
| 415 | @group | ||
| 416 | (single-key-description 'C-mouse-1 t) | ||
| 396 | @result{} "C-mouse-1" | 417 | @result{} "C-mouse-1" |
| 397 | @end group | 418 | @end group |
| 398 | @end smallexample | 419 | @end smallexample |