aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-05-01 19:35:40 +0000
committerRichard M. Stallman1994-05-01 19:35:40 +0000
commit82a2fe6969664879c2596ebe4166d0e5c1ac0013 (patch)
tree675ff21fbce2f678724e9d53f5d4d687a2270477
parentde9f0bd94f691d90c98b0d703f58f9036fdcd40e (diff)
downloademacs-82a2fe6969664879c2596ebe4166d0e5c1ac0013.tar.gz
emacs-82a2fe6969664879c2596ebe4166d0e5c1ac0013.zip
entered into RCS
-rw-r--r--lispref/help.texi69
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}}
82To save space, the documentation for preloaded functions and variables 82To 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
84the file @file{emacs/etc/DOC-@var{version}}. The data structure inside 84the file @file{emacs/etc/DOC-@var{version}}. The data structure inside
85Emacs has an integer offset into the file, where the documentation 85Emacs has an integer offset into the file, where the documentation
86string ought to be. The functions @code{documentation} the 86string 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;
89this is transparent to the user. Keeping the documentation strings out 89this 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
136The function @code{documentation} signals a @code{void-function} error 136The function @code{documentation} signals a @code{void-function} error
137unless @var{function} has a function definition. However, it is ok if 137if @var{function} has no function definition. However, it is ok if
138the function definition has no documentation string. In that case, 138the 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 143Here 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
145several symbols in a @samp{*Help*} buffer. 145several 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
279based on the current, actual key bindings. They can do so using certain 279current, actual key bindings. They can do so using certain special text
280special text sequences described below. Accessing documentation strings 280sequences described below. Accessing documentation strings in the usual
281in the usual way substitutes current key binding information for these 281way substitutes current key binding information for these special
282special sequences. This works by calling @code{substitute-command-keys}. 282sequences. This works by calling @code{substitute-command-keys}. You
283You can also call that function yourself. 283can 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
299sequences in this documentation string. 299sequences 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
303string in Emacs Lisp. 303string in Emacs Lisp.
304 304
305@defun substitute-command-keys string 305@defun substitute-command-keys string
306This function scans @var{string} for the above special sequences and 306This function scans @var{string} for the above special sequences and
307replaces them by what they stand for, returning the result as a string. 307replaces them by what they stand for, returning the result as a string.
308This permits display of documentation that refers accurately to the 308This permits display of documentation that refers accurately to the
309users's own customized key bindings. 309user'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
370as itself, but a control character turns into a string starting with 370as 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-},
372and space, linefeed, etc.@: appear as @samp{SPC}, @samp{LFD}, etc. A 372and space, linefeed, etc.@: appear as @samp{SPC}, @samp{LFD}, etc. A
373function key symbol appears as itself. An event which is a list appears 373function key symbol appears as itself. An event that is a list appears
374as the name of the symbol in the @sc{car} of the list. 374as 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
421we describe some program-level interfaces to the same information. 421we 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 424This function finds all symbols whose names contain a match for the
425regular expression @var{regexp}, and returns a list of them. 425regular expression @var{regexp}, and returns a list of them
426It 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
427one-line description. 427named @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 430If @var{do-all} is non-@code{nil}, then @code{apropos} also shows
431key bindings for the functions that are found. 431key bindings for the functions that are found.
432 432
433 If @var{predicate} is non-@code{nil}, it should be a function to be 433If @var{predicate} is non-@code{nil}, it should be a function to be
434called on each symbol that has matched @var{regexp}. Only symbols for 434called on each symbol that has matched @var{regexp}. Only symbols for
435which @var{predicate} returns a non-@code{nil} value are listed or 435which @var{predicate} returns a non-@code{nil} value are listed or
436displayed. 436displayed.
437 437
438 In the first of the following examples, @code{apropos} finds all the 438In the first of the following examples, @code{apropos} finds all the
439symbols with names containing @samp{exec}. In the second example, it 439symbols with names containing @samp{exec}. In the second example, it
440finds and returns only those symbols that are also commands. 440finds 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}, 469The command @kbd{C-h a} (@code{command-apropos}) calls @code{apropos},
470but specifies a @var{predicate} to restrict the output to symbols that 470but specifies a @var{predicate} to restrict the output to symbols that
471are commands. The call to @code{apropos} looks like this: 471are 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
480This function differs from @code{apropos} in that it searches 480This function differs from @code{apropos} in that it searches
481documentation strings as well as symbol names for matches for 481documentation 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
483and only those of functions and variables that are included in Emacs 483for preloaded functions and variables. If @var{do-all} is
484when it is dumped. If @var{do-all} is non-@code{nil}, it scans the 484non-@code{nil}, it scans the names and documentation strings of all
485names and documentation strings of all functions and variables. 485functions 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
507This function builds a string which is a message explaining how to 507This function builds a string that explains how to restore the previous
508restore the previous state of the windows after a help command. After 508state of the windows after a help command. After building the message,
509building the message, it applies @var{function} to it if @var{function} 509it applies @var{function} to it if @var{function} is non-@code{nil}.
510is non-@code{nil}. Otherwise it calls @code{message} to display it in 510Otherwise it calls @code{message} to display it in the echo area.
511the echo area.
512 511
513This function expects to be called inside a 512This 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}.
562This function calls @code{describe-bindings} to display a list of all 561This function calls @code{describe-bindings} to display a list of all
563the subcommands of the prefix key of the most recent key sequence. The 562the subcommands of the prefix key of the most recent key sequence. The
564prefix described consists of all but the last event of that key 563prefix described consists of all but the last event of that key
565sequence. 564sequence. (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
598This macro defines a help command named @var{fname} which acts like a 597This macro defines a help command named @var{fname} that acts like a
599prefix key which shows a list of the subcommands it offers. 598prefix key that shows a list of the subcommands it offers.
600 599
601When invoked, @var{fname} displays @var{help-text} in a window, then 600When invoked, @var{fname} displays @var{help-text} in a window, then
602reads and executes a key sequence according to @var{help-map}. The 601reads and executes a key sequence according to @var{help-map}. The
603string @var{help-text} should describe of the bindings available in 602string @var{help-text} should describe the bindings available in
604@var{help-map}. 603@var{help-map}.
605 604
606The command @var{fname} is defined to handle a few events itself, by 605The command @var{fname} is defined to handle a few events itself, by
607scrolling the display of @var{help-text}. When @var{fname} reads one of 606scrolling the display of @var{help-text}. When @var{fname} reads one of
608those special events, it does the scrolling and then reads another 607those special events, it does the scrolling and then reads another
609event. When it reads an event which is not one of those few, and which 608event. When it reads an event that is not one of those few, and which
610has a binding in @var{help-map}, it executes that key's binding and 609has a binding in @var{help-map}, it executes that key's binding and
611then returns. 610then returns.
612 611