diff options
| author | Richard M. Stallman | 1994-05-01 19:35:40 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-05-01 19:35:40 +0000 |
| commit | 82a2fe6969664879c2596ebe4166d0e5c1ac0013 (patch) | |
| tree | 675ff21fbce2f678724e9d53f5d4d687a2270477 | |
| parent | de9f0bd94f691d90c98b0d703f58f9036fdcd40e (diff) | |
| download | emacs-82a2fe6969664879c2596ebe4166d0e5c1ac0013.tar.gz emacs-82a2fe6969664879c2596ebe4166d0e5c1ac0013.zip | |
entered into RCS
| -rw-r--r-- | lispref/help.texi | 69 |
1 files changed, 34 insertions, 35 deletions
diff --git a/lispref/help.texi b/lispref/help.texi index 1aa2f654aa4..396d11b01ed 100644 --- a/lispref/help.texi +++ b/lispref/help.texi | |||
| @@ -80,10 +80,10 @@ function @code{documentation-property} knows how to extract it. | |||
| 80 | @cindex @file{emacs/etc/DOC-@var{version}} | 80 | @cindex @file{emacs/etc/DOC-@var{version}} |
| 81 | @cindex @file{etc/DOC-@var{version}} | 81 | @cindex @file{etc/DOC-@var{version}} |
| 82 | To save space, the documentation for preloaded functions and variables | 82 | To save space, the documentation for preloaded functions and variables |
| 83 | (including primitive functions and autoloaded functions) are stored in | 83 | (including primitive functions and autoloaded functions) is stored in |
| 84 | the file @file{emacs/etc/DOC-@var{version}}. The data structure inside | 84 | the file @file{emacs/etc/DOC-@var{version}}. The data structure inside |
| 85 | Emacs has an integer offset into the file, where the documentation | 85 | Emacs has an integer offset into the file, where the documentation |
| 86 | string ought to be. The functions @code{documentation} the | 86 | string ought to be. The functions @code{documentation} and |
| 87 | @code{documentation-property} read the documentation from the file | 87 | @code{documentation-property} read the documentation from the file |
| 88 | @file{emacs/etc/DOC-@var{version}} when they notice the integer there; | 88 | @file{emacs/etc/DOC-@var{version}} when they notice the integer there; |
| 89 | this is transparent to the user. Keeping the documentation strings out | 89 | this is transparent to the user. Keeping the documentation strings out |
| @@ -134,13 +134,13 @@ bindings. (This is not done if @var{verbatim} is non-@code{nil}; the | |||
| 134 | @var{verbatim} argument exists only as of Emacs 19.) | 134 | @var{verbatim} argument exists only as of Emacs 19.) |
| 135 | 135 | ||
| 136 | The function @code{documentation} signals a @code{void-function} error | 136 | The function @code{documentation} signals a @code{void-function} error |
| 137 | unless @var{function} has a function definition. However, it is ok if | 137 | if @var{function} has no function definition. However, it is ok if |
| 138 | the function definition has no documentation string. In that case, | 138 | the function definition has no documentation string. In that case, |
| 139 | @code{documentation} returns @code{nil}. | 139 | @code{documentation} returns @code{nil}. |
| 140 | @end defun | 140 | @end defun |
| 141 | 141 | ||
| 142 | @c Wordy to prevent overfull hboxes. --rjc 15mar92 | 142 | @c Wordy to prevent overfull hboxes. --rjc 15mar92 |
| 143 | Here is an example of using the two functions, @code{documentation} and | 143 | Here is an example of using the two functions, @code{documentation} and |
| 144 | @code{documentation-property}, to display the documentation strings for | 144 | @code{documentation-property}, to display the documentation strings for |
| 145 | several symbols in a @samp{*Help*} buffer. | 145 | several symbols in a @samp{*Help*} buffer. |
| 146 | 146 | ||
| @@ -275,12 +275,12 @@ In older Emacs versions, @code{exec-directory} was used for this. | |||
| 275 | @cindex keys in documentation strings | 275 | @cindex keys in documentation strings |
| 276 | @cindex substituting keys in documentation | 276 | @cindex substituting keys in documentation |
| 277 | 277 | ||
| 278 | When documentation strings refer to key sequences, they should do so | 278 | When documentation strings refer to key sequences, they should use the |
| 279 | based on the current, actual key bindings. They can do so using certain | 279 | current, actual key bindings. They can do so using certain special text |
| 280 | special text sequences described below. Accessing documentation strings | 280 | sequences described below. Accessing documentation strings in the usual |
| 281 | in the usual way substitutes current key binding information for these | 281 | way substitutes current key binding information for these special |
| 282 | special sequences. This works by calling @code{substitute-command-keys}. | 282 | sequences. This works by calling @code{substitute-command-keys}. You |
| 283 | You can also call that function yourself. | 283 | can also call that function yourself. |
| 284 | 284 | ||
| 285 | Here is a list of the special sequences and what they mean: | 285 | Here is a list of the special sequences and what they mean: |
| 286 | 286 | ||
| @@ -299,14 +299,14 @@ stands for no text itself. It is used for a side effect: it specifies | |||
| 299 | sequences in this documentation string. | 299 | sequences in this documentation string. |
| 300 | @end table | 300 | @end table |
| 301 | 301 | ||
| 302 | @strong{Please note:} each @samp{\} must be doubled when written in a | 302 | @strong{Please note:} Each @samp{\} must be doubled when written in a |
| 303 | string in Emacs Lisp. | 303 | string in Emacs Lisp. |
| 304 | 304 | ||
| 305 | @defun substitute-command-keys string | 305 | @defun substitute-command-keys string |
| 306 | This function scans @var{string} for the above special sequences and | 306 | This function scans @var{string} for the above special sequences and |
| 307 | replaces them by what they stand for, returning the result as a string. | 307 | replaces them by what they stand for, returning the result as a string. |
| 308 | This permits display of documentation that refers accurately to the | 308 | This permits display of documentation that refers accurately to the |
| 309 | users's own customized key bindings. | 309 | user's own customized key bindings. |
| 310 | @end defun | 310 | @end defun |
| 311 | 311 | ||
| 312 | Here are examples of the special sequences: | 312 | Here are examples of the special sequences: |
| @@ -370,7 +370,7 @@ Emacs notation for keyboard input. A normal printing character appears | |||
| 370 | as itself, but a control character turns into a string starting with | 370 | as itself, but a control character turns into a string starting with |
| 371 | @samp{C-}, a meta character turns into a string starting with @samp{M-}, | 371 | @samp{C-}, a meta character turns into a string starting with @samp{M-}, |
| 372 | and space, linefeed, etc.@: appear as @samp{SPC}, @samp{LFD}, etc. A | 372 | and space, linefeed, etc.@: appear as @samp{SPC}, @samp{LFD}, etc. A |
| 373 | function key symbol appears as itself. An event which is a list appears | 373 | function key symbol appears as itself. An event that is a list appears |
| 374 | as the name of the symbol in the @sc{car} of the list. | 374 | as the name of the symbol in the @sc{car} of the list. |
| 375 | 375 | ||
| 376 | @smallexample | 376 | @smallexample |
| @@ -421,21 +421,21 @@ about them, see @ref{Help, , Help, emacs, The GNU Emacs Manual}. Here | |||
| 421 | we describe some program-level interfaces to the same information. | 421 | we describe some program-level interfaces to the same information. |
| 422 | 422 | ||
| 423 | @deffn Command apropos regexp &optional do-all predicate | 423 | @deffn Command apropos regexp &optional do-all predicate |
| 424 | This function finds all symbols whose names contain a match for the | 424 | This function finds all symbols whose names contain a match for the |
| 425 | regular expression @var{regexp}, and returns a list of them. | 425 | regular expression @var{regexp}, and returns a list of them |
| 426 | It also displays the symbols in a buffer named @samp{*Help*}, each with a | 426 | (@pxref{Regular Expressions}). It also displays the symbols in a buffer |
| 427 | one-line description. | 427 | named @samp{*Help*}, each with a one-line description. |
| 428 | 428 | ||
| 429 | @c Emacs 19 feature | 429 | @c Emacs 19 feature |
| 430 | If @var{do-all} is non-@code{nil}, then @code{apropos} also shows | 430 | If @var{do-all} is non-@code{nil}, then @code{apropos} also shows |
| 431 | key bindings for the functions that are found. | 431 | key bindings for the functions that are found. |
| 432 | 432 | ||
| 433 | If @var{predicate} is non-@code{nil}, it should be a function to be | 433 | If @var{predicate} is non-@code{nil}, it should be a function to be |
| 434 | called on each symbol that has matched @var{regexp}. Only symbols for | 434 | called on each symbol that has matched @var{regexp}. Only symbols for |
| 435 | which @var{predicate} returns a non-@code{nil} value are listed or | 435 | which @var{predicate} returns a non-@code{nil} value are listed or |
| 436 | displayed. | 436 | displayed. |
| 437 | 437 | ||
| 438 | In the first of the following examples, @code{apropos} finds all the | 438 | In the first of the following examples, @code{apropos} finds all the |
| 439 | symbols with names containing @samp{exec}. In the second example, it | 439 | symbols with names containing @samp{exec}. In the second example, it |
| 440 | finds and returns only those symbols that are also commands. | 440 | finds and returns only those symbols that are also commands. |
| 441 | (We don't show the output that results in the @samp{*Help*} buffer.) | 441 | (We don't show the output that results in the @samp{*Help*} buffer.) |
| @@ -466,7 +466,7 @@ execute-extended-command ESC x | |||
| 466 | @end ignore | 466 | @end ignore |
| 467 | @end smallexample | 467 | @end smallexample |
| 468 | 468 | ||
| 469 | The command @kbd{C-h a} (@code{command-apropos}) calls @code{apropos}, | 469 | The command @kbd{C-h a} (@code{command-apropos}) calls @code{apropos}, |
| 470 | but specifies a @var{predicate} to restrict the output to symbols that | 470 | but specifies a @var{predicate} to restrict the output to symbols that |
| 471 | are commands. The call to @code{apropos} looks like this: | 471 | are commands. The call to @code{apropos} looks like this: |
| 472 | 472 | ||
| @@ -479,10 +479,10 @@ are commands. The call to @code{apropos} looks like this: | |||
| 479 | @deffn Command super-apropos regexp &optional do-all | 479 | @deffn Command super-apropos regexp &optional do-all |
| 480 | This function differs from @code{apropos} in that it searches | 480 | This function differs from @code{apropos} in that it searches |
| 481 | documentation strings as well as symbol names for matches for | 481 | documentation strings as well as symbol names for matches for |
| 482 | @var{regexp}. By default, it searches only the documentation strings, | 482 | @var{regexp}. By default, it searches the documentation strings only |
| 483 | and only those of functions and variables that are included in Emacs | 483 | for preloaded functions and variables. If @var{do-all} is |
| 484 | when it is dumped. If @var{do-all} is non-@code{nil}, it scans the | 484 | non-@code{nil}, it scans the names and documentation strings of all |
| 485 | names and documentation strings of all functions and variables. | 485 | functions and variables. |
| 486 | @end deffn | 486 | @end deffn |
| 487 | 487 | ||
| 488 | @defvar help-map | 488 | @defvar help-map |
| @@ -504,11 +504,10 @@ follows: | |||
| 504 | @end deffn | 504 | @end deffn |
| 505 | 505 | ||
| 506 | @defun print-help-return-message &optional function | 506 | @defun print-help-return-message &optional function |
| 507 | This function builds a string which is a message explaining how to | 507 | This function builds a string that explains how to restore the previous |
| 508 | restore the previous state of the windows after a help command. After | 508 | state of the windows after a help command. After building the message, |
| 509 | building the message, it applies @var{function} to it if @var{function} | 509 | it applies @var{function} to it if @var{function} is non-@code{nil}. |
| 510 | is non-@code{nil}. Otherwise it calls @code{message} to display it in | 510 | Otherwise it calls @code{message} to display it in the echo area. |
| 511 | the echo area. | ||
| 512 | 511 | ||
| 513 | This function expects to be called inside a | 512 | This function expects to be called inside a |
| 514 | @code{with-output-to-temp-buffer} special form, and expects | 513 | @code{with-output-to-temp-buffer} special form, and expects |
| @@ -562,7 +561,7 @@ The variable's default value is @code{describe-prefix-bindings}. | |||
| 562 | This function calls @code{describe-bindings} to display a list of all | 561 | This function calls @code{describe-bindings} to display a list of all |
| 563 | the subcommands of the prefix key of the most recent key sequence. The | 562 | the subcommands of the prefix key of the most recent key sequence. The |
| 564 | prefix described consists of all but the last event of that key | 563 | prefix described consists of all but the last event of that key |
| 565 | sequence. | 564 | sequence. (The last event is, presumably, the help character.) |
| 566 | @end defun | 565 | @end defun |
| 567 | 566 | ||
| 568 | The following two functions are found in the library @file{helper}. | 567 | The following two functions are found in the library @file{helper}. |
| @@ -595,18 +594,18 @@ Emacs versions, @code{exec-directory} was used for this. | |||
| 595 | 594 | ||
| 596 | @c Emacs 19 feature | 595 | @c Emacs 19 feature |
| 597 | @defmac make-help-screen fname help-line help-text help-map | 596 | @defmac make-help-screen fname help-line help-text help-map |
| 598 | This macro defines a help command named @var{fname} which acts like a | 597 | This macro defines a help command named @var{fname} that acts like a |
| 599 | prefix key which shows a list of the subcommands it offers. | 598 | prefix key that shows a list of the subcommands it offers. |
| 600 | 599 | ||
| 601 | When invoked, @var{fname} displays @var{help-text} in a window, then | 600 | When invoked, @var{fname} displays @var{help-text} in a window, then |
| 602 | reads and executes a key sequence according to @var{help-map}. The | 601 | reads and executes a key sequence according to @var{help-map}. The |
| 603 | string @var{help-text} should describe of the bindings available in | 602 | string @var{help-text} should describe the bindings available in |
| 604 | @var{help-map}. | 603 | @var{help-map}. |
| 605 | 604 | ||
| 606 | The command @var{fname} is defined to handle a few events itself, by | 605 | The command @var{fname} is defined to handle a few events itself, by |
| 607 | scrolling the display of @var{help-text}. When @var{fname} reads one of | 606 | scrolling the display of @var{help-text}. When @var{fname} reads one of |
| 608 | those special events, it does the scrolling and then reads another | 607 | those special events, it does the scrolling and then reads another |
| 609 | event. When it reads an event which is not one of those few, and which | 608 | event. When it reads an event that is not one of those few, and which |
| 610 | has a binding in @var{help-map}, it executes that key's binding and | 609 | has a binding in @var{help-map}, it executes that key's binding and |
| 611 | then returns. | 610 | then returns. |
| 612 | 611 | ||