diff options
| -rw-r--r-- | lispref/help.texi | 36 |
1 files changed, 30 insertions, 6 deletions
diff --git a/lispref/help.texi b/lispref/help.texi index c7c99fa8987..4821478a3ad 100644 --- a/lispref/help.texi +++ b/lispref/help.texi | |||
| @@ -133,11 +133,17 @@ unless @var{verbatim} is non-@code{nil}. | |||
| 133 | (symbol-plist 'command-line-processed) | 133 | (symbol-plist 'command-line-processed) |
| 134 | @result{} (variable-documentation 188902) | 134 | @result{} (variable-documentation 188902) |
| 135 | @end group | 135 | @end group |
| 136 | @group | ||
| 137 | (documentation-property 'emacs 'group-documentation) | ||
| 138 | @result{} "Customization of the One True Editor." | ||
| 139 | @end group | ||
| 136 | @end smallexample | 140 | @end smallexample |
| 137 | @end defun | 141 | @end defun |
| 138 | 142 | ||
| 139 | @defun documentation function &optional verbatim | 143 | @defun documentation function &optional verbatim |
| 140 | This function returns the documentation string of @var{function}. | 144 | This function returns the documentation string of @var{function}. |
| 145 | @code{documentation} handles macros, named keyboard macros, and | ||
| 146 | special forms, as well as ordinary functions. | ||
| 141 | 147 | ||
| 142 | If @var{function} is a symbol, this function first looks for the | 148 | If @var{function} is a symbol, this function first looks for the |
| 143 | @code{function-documentation} property of that symbol; if that has a | 149 | @code{function-documentation} property of that symbol; if that has a |
| @@ -157,6 +163,11 @@ the function definition has no documentation string. In that case, | |||
| 157 | @code{documentation} returns @code{nil}. | 163 | @code{documentation} returns @code{nil}. |
| 158 | @end defun | 164 | @end defun |
| 159 | 165 | ||
| 166 | @defun face-documentation face | ||
| 167 | This function returns the documentation string of @var{face} as a | ||
| 168 | face. | ||
| 169 | @end defun | ||
| 170 | |||
| 160 | @c Wordy to prevent overfull hboxes. --rjc 15mar92 | 171 | @c Wordy to prevent overfull hboxes. --rjc 15mar92 |
| 161 | Here is an example of using the two functions, @code{documentation} and | 172 | Here is an example of using the two functions, @code{documentation} and |
| 162 | @code{documentation-property}, to display the documentation strings for | 173 | @code{documentation-property}, to display the documentation strings for |
| @@ -498,15 +509,28 @@ the user as subcommands of the prefix @kbd{C-h}. For more information | |||
| 498 | about them, see @ref{Help, , Help, emacs, The GNU Emacs Manual}. Here | 509 | about them, see @ref{Help, , Help, emacs, The GNU Emacs Manual}. Here |
| 499 | we describe some program-level interfaces to the same information. | 510 | we describe some program-level interfaces to the same information. |
| 500 | 511 | ||
| 501 | @deffn Command apropos regexp &optional do-all | 512 | @deffn Command apropos pattern &optional do-all |
| 502 | This function finds all ``meaningful'' symbols whose names contain a | 513 | This function finds all ``meaningful'' symbols whose names contain a |
| 503 | match for the regular expression @var{regexp}, and returns a list of | 514 | match for the apropos pattern @var{pattern}. An apropos pattern is |
| 504 | them, with associated documentation (@pxref{Regular Expressions}). It | 515 | either a word to match, a space-separated list of words of which at |
| 505 | also displays the symbols in a buffer named @samp{*Apropos*}, each | 516 | least two must match, or a regular expression (if any special regular |
| 506 | with a one-line description taken from the beginning of its | 517 | expression characters occur). A symbol is ``meaningful'' if it has a |
| 507 | documentation string. A symbol is ``meaningful'' if it has a | ||
| 508 | definition as a function, variable, or face, or has properties. | 518 | definition as a function, variable, or face, or has properties. |
| 509 | 519 | ||
| 520 | The function returns a list of elements that look like this: | ||
| 521 | |||
| 522 | @example | ||
| 523 | (@var{symbol} @var{score} @var{fn-doc} @var{var-doc} @var{plist-doc} @var{widget-doc} @var{face-doc} @var{group-doc}) | ||
| 524 | @end example | ||
| 525 | |||
| 526 | Here, @var{score} is an integer measure of how important the symbol | ||
| 527 | seems to be as a match, and the remaining elements are documentation | ||
| 528 | strings for @var{symbol}'s various roles (or @code{nil}). | ||
| 529 | |||
| 530 | It also displays the symbols in a buffer named @samp{*Apropos*}, each | ||
| 531 | with a one-line description taken from the beginning of its | ||
| 532 | documentation string. | ||
| 533 | |||
| 510 | @c Emacs 19 feature | 534 | @c Emacs 19 feature |
| 511 | If @var{do-all} is non-@code{nil}, or if the user option | 535 | If @var{do-all} is non-@code{nil}, or if the user option |
| 512 | @code{apropos-do-all} is non-@code{nil}, then @code{apropos} also | 536 | @code{apropos-do-all} is non-@code{nil}, then @code{apropos} also |