Convert consecutive FSF copyright years to ranges.
[bpt/emacs.git] / doc / lispref / help.texi
CommitLineData
b8d4c8d0
GM
1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual.
73b0cd50 3@c Copyright (C) 1990-1995, 1998-1999, 2001-2011
e9bffc61 4@c Free Software Foundation, Inc.
b8d4c8d0 5@c See the file elisp.texi for copying conditions.
6336d8c3 6@setfilename ../../info/help
b8d4c8d0
GM
7@node Documentation, Files, Modes, Top
8@chapter Documentation
9@cindex documentation strings
10
11 GNU Emacs Lisp has convenient on-line help facilities, most of which
12derive their information from the documentation strings associated with
13functions and variables. This chapter describes how to write good
14documentation strings for your Lisp programs, as well as how to write
15programs to access documentation.
16
17 Note that the documentation strings for Emacs are not the same thing
18as the Emacs manual. Manuals have their own source files, written in
19the Texinfo language; documentation strings are specified in the
20definitions of the functions and variables they apply to. A collection
21of documentation strings is not sufficient as a manual because a good
22manual is not organized in that fashion; it is organized in terms of
23topics of discussion.
24
25 For commands to display documentation strings, see @ref{Help, ,
26Help, emacs, The GNU Emacs Manual}. For the conventions for writing
27documentation strings, see @ref{Documentation Tips}.
28
29@menu
30* Documentation Basics:: Good style for doc strings.
31 Where to put them. How Emacs stores them.
32* Accessing Documentation:: How Lisp programs can access doc strings.
33* Keys in Documentation:: Substituting current key bindings.
34* Describing Characters:: Making printable descriptions of
35 non-printing characters and key sequences.
36* Help Functions:: Subroutines used by Emacs help facilities.
37@end menu
38
39@node Documentation Basics
40@comment node-name, next, previous, up
41@section Documentation Basics
42@cindex documentation conventions
43@cindex writing a documentation string
44@cindex string, writing a doc string
45
46 A documentation string is written using the Lisp syntax for strings,
47with double-quote characters surrounding the text of the string. This
48is because it really is a Lisp string object. The string serves as
49documentation when it is written in the proper place in the definition
50of a function or variable. In a function definition, the documentation
51string follows the argument list. In a variable definition, the
52documentation string follows the initial value of the variable.
53
54 When you write a documentation string, make the first line a
55complete sentence (or two complete sentences) since some commands,
56such as @code{apropos}, show only the first line of a multi-line
57documentation string. Also, you should not indent the second line of
58a documentation string, if it has one, because that looks odd when you
59use @kbd{C-h f} (@code{describe-function}) or @kbd{C-h v}
60(@code{describe-variable}) to view the documentation string. There
61are many other conventions for doc strings; see @ref{Documentation
62Tips}.
63
64 Documentation strings can contain several special substrings, which
65stand for key bindings to be looked up in the current keymaps when the
66documentation is displayed. This allows documentation strings to refer
67to the keys for related commands and be accurate even when a user
68rearranges the key bindings. (@xref{Keys in Documentation}.)
69
70@vindex emacs-lisp-docstring-fill-column
71 Emacs Lisp mode fills documentation strings to the width
72specified by @code{emacs-lisp-docstring-fill-column}.
73
74 In Emacs Lisp, a documentation string is accessible through the
75function or variable that it describes:
76
77@itemize @bullet
78@item
79@kindex function-documentation
80The documentation for a function is usually stored in the function
81definition itself (@pxref{Lambda Expressions}). The function
82@code{documentation} knows how to extract it. You can also put
83function documentation in the @code{function-documentation} property
84of the function name. That is useful with definitions such as
85keyboard macros that can't hold a documentation string.
86
87@item
88@kindex variable-documentation
89The documentation for a variable is stored in the variable's property
90list under the property name @code{variable-documentation}. The
91function @code{documentation-property} knows how to retrieve it.
92@end itemize
93
94@cindex @file{DOC-@var{version}} (documentation) file
95To save space, the documentation for preloaded functions and variables
96(including primitive functions and autoloaded functions) is stored in
97the file @file{emacs/etc/DOC-@var{version}}---not inside Emacs. The
98documentation strings for functions and variables loaded during the
99Emacs session from byte-compiled files are stored in those files
100(@pxref{Docs and Compilation}).
101
102The data structure inside Emacs has an integer offset into the file, or
103a list containing a file name and an integer, in place of the
104documentation string. The functions @code{documentation} and
105@code{documentation-property} use that information to fetch the
106documentation string from the appropriate file; this is transparent to
107the user.
108
b8d4c8d0
GM
109@node Accessing Documentation
110@section Access to Documentation Strings
111
112@defun documentation-property symbol property &optional verbatim
113This function returns the documentation string that is recorded in
114@var{symbol}'s property list under property @var{property}. It
115retrieves the text from a file if the value calls for that. If the
116property value isn't @code{nil}, isn't a string, and doesn't refer to
117text in a file, then it is evaluated to obtain a string.
118
119The last thing this function does is pass the string through
120@code{substitute-command-keys} to substitute actual key bindings,
121unless @var{verbatim} is non-@code{nil}.
122
123@smallexample
124@group
125(documentation-property 'command-line-processed
126 'variable-documentation)
127 @result{} "Non-nil once command line has been processed"
128@end group
129@group
130(symbol-plist 'command-line-processed)
131 @result{} (variable-documentation 188902)
132@end group
133@group
134(documentation-property 'emacs 'group-documentation)
135 @result{} "Customization of the One True Editor."
136@end group
137@end smallexample
138@end defun
139
140@defun documentation function &optional verbatim
141This function returns the documentation string of @var{function}.
142@code{documentation} handles macros, named keyboard macros, and
143special forms, as well as ordinary functions.
144
145If @var{function} is a symbol, this function first looks for the
146@code{function-documentation} property of that symbol; if that has a
147non-@code{nil} value, the documentation comes from that value (if the
148value is not a string, it is evaluated). If @var{function} is not a
149symbol, or if it has no @code{function-documentation} property, then
150@code{documentation} extracts the documentation string from the actual
151function definition, reading it from a file if called for.
152
153Finally, unless @var{verbatim} is non-@code{nil}, it calls
154@code{substitute-command-keys} so as to return a value containing the
155actual (current) key bindings.
156
157The function @code{documentation} signals a @code{void-function} error
158if @var{function} has no function definition. However, it is OK if
159the function definition has no documentation string. In that case,
160@code{documentation} returns @code{nil}.
161@end defun
162
163@defun face-documentation face
164This function returns the documentation string of @var{face} as a
165face.
166@end defun
167
168@c Wordy to prevent overfull hboxes. --rjc 15mar92
169Here is an example of using the two functions, @code{documentation} and
170@code{documentation-property}, to display the documentation strings for
171several symbols in a @samp{*Help*} buffer.
172
173@anchor{describe-symbols example}
174@smallexample
175@group
176(defun describe-symbols (pattern)
177 "Describe the Emacs Lisp symbols matching PATTERN.
178All symbols that have PATTERN in their name are described
179in the `*Help*' buffer."
180 (interactive "sDescribe symbols matching: ")
181 (let ((describe-func
182 (function
183 (lambda (s)
184@end group
185@group
186 ;; @r{Print description of symbol.}
187 (if (fboundp s) ; @r{It is a function.}
188 (princ
189 (format "%s\t%s\n%s\n\n" s
190 (if (commandp s)
191 (let ((keys (where-is-internal s)))
192 (if keys
193 (concat
194 "Keys: "
195 (mapconcat 'key-description
196 keys " "))
197 "Keys: none"))
198 "Function")
199@end group
200@group
201 (or (documentation s)
202 "not documented"))))
203
204 (if (boundp s) ; @r{It is a variable.}
205@end group
206@group
207 (princ
208 (format "%s\t%s\n%s\n\n" s
209 (if (user-variable-p s)
210 "Option " "Variable")
211@end group
212@group
213 (or (documentation-property
214 s 'variable-documentation)
215 "not documented")))))))
216 sym-list)
217@end group
218
219@group
220 ;; @r{Build a list of symbols that match pattern.}
221 (mapatoms (function
222 (lambda (sym)
223 (if (string-match pattern (symbol-name sym))
224 (setq sym-list (cons sym sym-list))))))
225@end group
226
227@group
228 ;; @r{Display the data.}
b2a77f6d
CY
229 (help-setup-xref (list 'describe-symbols pattern) (interactive-p))
230 (with-help-window (help-buffer)
231 (mapcar describe-func (sort sym-list 'string<)))))
b8d4c8d0
GM
232@end group
233@end smallexample
234
235 The @code{describe-symbols} function works like @code{apropos},
236but provides more information.
237
238@smallexample
239@group
240(describe-symbols "goal")
241
242---------- Buffer: *Help* ----------
243goal-column Option
f5c63335 244Semipermanent goal column for vertical motion, as set by @dots{}
b8d4c8d0
GM
245@end group
246@c Do not blithely break or fill these lines.
247@c That makes them incorrect.
248
249@group
250set-goal-column Keys: C-x C-n
251Set the current horizontal position as a goal for C-n and C-p.
252@end group
253@c DO NOT put a blank line here! That is factually inaccurate!
254@group
255Those commands will move to this position in the line moved to
256rather than trying to keep the same horizontal position.
257With a non-nil argument, clears out the goal column
258so that C-n and C-p resume vertical motion.
259The goal column is stored in the variable `goal-column'.
260@end group
261
262@group
263temporary-goal-column Variable
264Current goal column for vertical motion.
265It is the column where point was
266at the start of current run of vertical motion commands.
267When the `track-eol' feature is doing its job, the value is 9999.
268---------- Buffer: *Help* ----------
269@end group
270@end smallexample
271
b8d4c8d0
GM
272@defun Snarf-documentation filename
273@anchor{Definition of Snarf-documentation}
274This function is used only during Emacs initialization, just before
275the runnable Emacs is dumped. It finds the file offsets of the
276documentation strings stored in the file @var{filename}, and records
277them in the in-core function definitions and variable property lists in
278place of the actual strings. @xref{Building Emacs}.
279
280Emacs reads the file @var{filename} from the @file{emacs/etc} directory.
281When the dumped Emacs is later executed, the same file will be looked
282for in the directory @code{doc-directory}. Usually @var{filename} is
283@code{"DOC-@var{version}"}.
284@end defun
285
b8d4c8d0
GM
286@defvar doc-directory
287This variable holds the name of the directory which should contain the
288file @code{"DOC-@var{version}"} that contains documentation strings for
289built-in and preloaded functions and variables.
290
291In most cases, this is the same as @code{data-directory}. They may be
292different when you run Emacs from the directory where you built it,
293without actually installing it. @xref{Definition of data-directory}.
b8d4c8d0
GM
294@end defvar
295
296@node Keys in Documentation
297@section Substituting Key Bindings in Documentation
298@cindex documentation, keys in
299@cindex keys in documentation strings
300@cindex substituting keys in documentation
301
302 When documentation strings refer to key sequences, they should use the
303current, actual key bindings. They can do so using certain special text
304sequences described below. Accessing documentation strings in the usual
305way substitutes current key binding information for these special
306sequences. This works by calling @code{substitute-command-keys}. You
307can also call that function yourself.
308
309 Here is a list of the special sequences and what they mean:
310
311@table @code
312@item \[@var{command}]
313stands for a key sequence that will invoke @var{command}, or @samp{M-x
314@var{command}} if @var{command} has no key bindings.
315
316@item \@{@var{mapvar}@}
317stands for a summary of the keymap which is the value of the variable
318@var{mapvar}. The summary is made using @code{describe-bindings}.
319
320@item \<@var{mapvar}>
321stands for no text itself. It is used only for a side effect: it
322specifies @var{mapvar}'s value as the keymap for any following
323@samp{\[@var{command}]} sequences in this documentation string.
324
325@item \=
326quotes the following character and is discarded; thus, @samp{\=\[} puts
327@samp{\[} into the output, and @samp{\=\=} puts @samp{\=} into the
328output.
329@end table
330
331@strong{Please note:} Each @samp{\} must be doubled when written in a
332string in Emacs Lisp.
333
334@defun substitute-command-keys string
335This function scans @var{string} for the above special sequences and
336replaces them by what they stand for, returning the result as a string.
337This permits display of documentation that refers accurately to the
338user's own customized key bindings.
339@end defun
340
341 Here are examples of the special sequences:
342
343@smallexample
344@group
345(substitute-command-keys
346 "To abort recursive edit, type: \\[abort-recursive-edit]")
347@result{} "To abort recursive edit, type: C-]"
348@end group
349
350@group
351(substitute-command-keys
352 "The keys that are defined for the minibuffer here are:
353 \\@{minibuffer-local-must-match-map@}")
354@result{} "The keys that are defined for the minibuffer here are:
355@end group
356
357? minibuffer-completion-help
358SPC minibuffer-complete-word
359TAB minibuffer-complete
360C-j minibuffer-complete-and-exit
361RET minibuffer-complete-and-exit
362C-g abort-recursive-edit
363"
364
365@group
366(substitute-command-keys
367 "To abort a recursive edit from the minibuffer, type\
368\\<minibuffer-local-must-match-map>\\[abort-recursive-edit].")
369@result{} "To abort a recursive edit from the minibuffer, type C-g."
370@end group
371@end smallexample
372
373 There are other special conventions for the text in documentation
374strings---for instance, you can refer to functions, variables, and
375sections of this manual. @xref{Documentation Tips}, for details.
376
377@node Describing Characters
378@section Describing Characters for Help Messages
379@cindex describe characters and events
380
381 These functions convert events, key sequences, or characters to
382textual descriptions. These descriptions are useful for including
383arbitrary text characters or key sequences in messages, because they
384convert non-printing and whitespace characters to sequences of printing
385characters. The description of a non-whitespace printing character is
386the character itself.
387
388@defun key-description sequence &optional prefix
389@cindex Emacs event standard notation
390This function returns a string containing the Emacs standard notation
391for the input events in @var{sequence}. If @var{prefix} is
392non-@code{nil}, it is a sequence of input events leading up to
393@var{sequence} and is included in the return value. Both arguments
394may be strings, vectors or lists. @xref{Input Events}, for more
395information about valid events.
396
397@smallexample
398@group
399(key-description [?\M-3 delete])
400 @result{} "M-3 <delete>"
401@end group
402@group
403(key-description [delete] "\M-3")
404 @result{} "M-3 <delete>"
405@end group
406@end smallexample
407
408 See also the examples for @code{single-key-description}, below.
409@end defun
410
411@defun single-key-description event &optional no-angles
412@cindex event printing
413@cindex character printing
414@cindex control character printing
415@cindex meta character printing
416This function returns a string describing @var{event} in the standard
417Emacs notation for keyboard input. A normal printing character
418appears as itself, but a control character turns into a string
419starting with @samp{C-}, a meta character turns into a string starting
420with @samp{M-}, and space, tab, etc.@: appear as @samp{SPC},
421@samp{TAB}, etc. A function key symbol appears inside angle brackets
422@samp{<@dots{}>}. An event that is a list appears as the name of the
423symbol in the @sc{car} of the list, inside angle brackets.
424
425If the optional argument @var{no-angles} is non-@code{nil}, the angle
426brackets around function keys and event symbols are omitted; this is
427for compatibility with old versions of Emacs which didn't use the
428brackets.
429
430@smallexample
431@group
432(single-key-description ?\C-x)
433 @result{} "C-x"
434@end group
435@group
436(key-description "\C-x \M-y \n \t \r \f123")
437 @result{} "C-x SPC M-y SPC C-j SPC TAB SPC RET SPC C-l 1 2 3"
438@end group
439@group
440(single-key-description 'delete)
441 @result{} "<delete>"
442@end group
443@group
444(single-key-description 'C-mouse-1)
445 @result{} "<C-mouse-1>"
446@end group
447@group
448(single-key-description 'C-mouse-1 t)
449 @result{} "C-mouse-1"
450@end group
451@end smallexample
452@end defun
453
454@defun text-char-description character
455This function returns a string describing @var{character} in the
456standard Emacs notation for characters that appear in text---like
457@code{single-key-description}, except that control characters are
458represented with a leading caret (which is how control characters in
459Emacs buffers are usually displayed). Another difference is that
460@code{text-char-description} recognizes the 2**7 bit as the Meta
461character, whereas @code{single-key-description} uses the 2**27 bit
462for Meta.
463
464@smallexample
465@group
466(text-char-description ?\C-c)
467 @result{} "^C"
468@end group
469@group
470(text-char-description ?\M-m)
471 @result{} "\xed"
472@end group
473@group
474(text-char-description ?\C-\M-m)
475 @result{} "\x8d"
476@end group
477@group
478(text-char-description (+ 128 ?m))
479 @result{} "M-m"
480@end group
481@group
482(text-char-description (+ 128 ?\C-m))
483 @result{} "M-^M"
484@end group
485@end smallexample
486@end defun
487
488@defun read-kbd-macro string &optional need-vector
489This function is used mainly for operating on keyboard macros, but it
490can also be used as a rough inverse for @code{key-description}. You
491call it with a string containing key descriptions, separated by spaces;
492it returns a string or vector containing the corresponding events.
493(This may or may not be a single valid key sequence, depending on what
494events you use; @pxref{Key Sequences}.) If @var{need-vector} is
495non-@code{nil}, the return value is always a vector.
496@end defun
497
498@node Help Functions
499@section Help Functions
500
501 Emacs provides a variety of on-line help functions, all accessible to
502the user as subcommands of the prefix @kbd{C-h}. For more information
503about them, see @ref{Help, , Help, emacs, The GNU Emacs Manual}. Here
504we describe some program-level interfaces to the same information.
505
506@deffn Command apropos pattern &optional do-all
507This function finds all ``meaningful'' symbols whose names contain a
508match for the apropos pattern @var{pattern}. An apropos pattern is
509either a word to match, a space-separated list of words of which at
510least two must match, or a regular expression (if any special regular
511expression characters occur). A symbol is ``meaningful'' if it has a
512definition as a function, variable, or face, or has properties.
513
514The function returns a list of elements that look like this:
515
516@example
517(@var{symbol} @var{score} @var{fn-doc} @var{var-doc}
518 @var{plist-doc} @var{widget-doc} @var{face-doc} @var{group-doc})
519@end example
520
521Here, @var{score} is an integer measure of how important the symbol
522seems to be as a match, and the remaining elements are documentation
523strings for @var{symbol}'s various roles (or @code{nil}).
524
525It also displays the symbols in a buffer named @samp{*Apropos*}, each
526with a one-line description taken from the beginning of its
527documentation string.
528
b8d4c8d0
GM
529If @var{do-all} is non-@code{nil}, or if the user option
530@code{apropos-do-all} is non-@code{nil}, then @code{apropos} also
531shows key bindings for the functions that are found; it also shows
532@emph{all} interned symbols, not just meaningful ones (and it lists
533them in the return value as well).
534@end deffn
535
536@defvar help-map
537The value of this variable is a local keymap for characters following the
538Help key, @kbd{C-h}.
539@end defvar
540
541@deffn {Prefix Command} help-command
542This symbol is not a function; its function definition cell holds the
543keymap known as @code{help-map}. It is defined in @file{help.el} as
544follows:
545
546@smallexample
547@group
3e99b825 548(define-key global-map (string help-char) 'help-command)
b8d4c8d0
GM
549(fset 'help-command help-map)
550@end group
551@end smallexample
552@end deffn
553
01f17ae2 554@defopt help-char
b8d4c8d0
GM
555The value of this variable is the help character---the character that
556Emacs recognizes as meaning Help. By default, its value is 8, which
557stands for @kbd{C-h}. When Emacs reads this character, if
558@code{help-form} is a non-@code{nil} Lisp expression, it evaluates that
559expression, and displays the result in a window if it is a string.
560
561Usually the value of @code{help-form} is @code{nil}. Then the
562help character has no special meaning at the level of command input, and
563it becomes part of a key sequence in the normal way. The standard key
564binding of @kbd{C-h} is a prefix key for several general-purpose help
565features.
566
567The help character is special after prefix keys, too. If it has no
568binding as a subcommand of the prefix key, it runs
569@code{describe-prefix-bindings}, which displays a list of all the
570subcommands of the prefix key.
01f17ae2 571@end defopt
b8d4c8d0 572
01f17ae2 573@defopt help-event-list
b8d4c8d0
GM
574The value of this variable is a list of event types that serve as
575alternative ``help characters.'' These events are handled just like the
576event specified by @code{help-char}.
01f17ae2 577@end defopt
b8d4c8d0
GM
578
579@defvar help-form
580If this variable is non-@code{nil}, its value is a form to evaluate
581whenever the character @code{help-char} is read. If evaluating the form
582produces a string, that string is displayed.
583
584A command that calls @code{read-event} or @code{read-char} probably
585should bind @code{help-form} to a non-@code{nil} expression while it
586does input. (The time when you should not do this is when @kbd{C-h} has
587some other meaning.) Evaluating this expression should result in a
588string that explains what the input is for and how to enter it properly.
589
590Entry to the minibuffer binds this variable to the value of
591@code{minibuffer-help-form} (@pxref{Definition of minibuffer-help-form}).
592@end defvar
593
594@defvar prefix-help-command
595This variable holds a function to print help for a prefix key. The
596function is called when the user types a prefix key followed by the help
597character, and the help character has no binding after that prefix. The
598variable's default value is @code{describe-prefix-bindings}.
599@end defvar
600
601@defun describe-prefix-bindings
602This function calls @code{describe-bindings} to display a list of all
603the subcommands of the prefix key of the most recent key sequence. The
604prefix described consists of all but the last event of that key
605sequence. (The last event is, presumably, the help character.)
606@end defun
607
608 The following two functions are meant for modes that want to provide
609help without relinquishing control, such as the ``electric'' modes.
610Their names begin with @samp{Helper} to distinguish them from the
611ordinary help functions.
612
613@deffn Command Helper-describe-bindings
614This command pops up a window displaying a help buffer containing a
615listing of all of the key bindings from both the local and global keymaps.
616It works by calling @code{describe-bindings}.
617@end deffn
618
619@deffn Command Helper-help
620This command provides help for the current mode. It prompts the user
621in the minibuffer with the message @samp{Help (Type ? for further
622options)}, and then provides assistance in finding out what the key
623bindings are, and what the mode is intended for. It returns @code{nil}.
624
625This can be customized by changing the map @code{Helper-help-map}.
626@end deffn
627
b8d4c8d0
GM
628@defvar data-directory
629@anchor{Definition of data-directory}
630This variable holds the name of the directory in which Emacs finds
bbe45ef7 631certain documentation and text files that come with Emacs.
b8d4c8d0
GM
632@end defvar
633
77c7e2e1 634@defun help-buffer
b2a77f6d
CY
635This function returns the name of the help buffer, which is normally
636@samp{*Help*}; if such a buffer does not exist, it is first created.
77c7e2e1 637@end defun
b2a77f6d
CY
638
639@defmac with-help-window buffer-name body@dots{}
640This macro evaluates the @var{body} forms, inserting any output they
641produce into a buffer named @var{buffer-name} like
642@code{with-output-to-temp-buffer} (@pxref{Temporary Displays}).
643(Usually, @var{buffer-name} should be the value returned by the
644function @code{help-buffer}.) It also puts the specified buffer into
645Help mode and displays a message telling the user how to quit and
646scroll the help window.
647@end defmac
648
77c7e2e1 649@defun help-setup-xref item interactive-p
b2a77f6d
CY
650This function updates the cross reference data in the @samp{*Help*}
651buffer, which is used to regenerate the help information when the user
652clicks on the @samp{Back} or @samp{Forward} buttons. Most commands
653that use the @samp{*Help*} buffer should invoke this function before
654clearing the buffer. The @var{item} argument should have the form
655@code{(@var{funtion} . @var{args})}, where @var{funtion} is a function
656to call, with argument list @var{args}, to regenerate the help buffer.
657The @var{interactive-p} argument is non-@code{nil} if the calling
658command was invoked interactively; in that case, the stack of items
659for the @samp{*Help*} buffer's @samp{Back} buttons is cleared.
77c7e2e1 660@end defun
b2a77f6d
CY
661
662@xref{describe-symbols example}, for an example of using
663@code{help-buffer}, @code{with-help-window}, and
664@code{help-setup-xref}.
665
b8d4c8d0
GM
666@defmac make-help-screen fname help-line help-text help-map
667This macro defines a help command named @var{fname} that acts like a
668prefix key that shows a list of the subcommands it offers.
669
670When invoked, @var{fname} displays @var{help-text} in a window, then
671reads and executes a key sequence according to @var{help-map}. The
672string @var{help-text} should describe the bindings available in
673@var{help-map}.
674
675The command @var{fname} is defined to handle a few events itself, by
676scrolling the display of @var{help-text}. When @var{fname} reads one of
677those special events, it does the scrolling and then reads another
678event. When it reads an event that is not one of those few, and which
679has a binding in @var{help-map}, it executes that key's binding and
680then returns.
681
682The argument @var{help-line} should be a single-line summary of the
683alternatives in @var{help-map}. In the current version of Emacs, this
684argument is used only if you set the option @code{three-step-help} to
685@code{t}.
686
687This macro is used in the command @code{help-for-help} which is the
688binding of @kbd{C-h C-h}.
689@end defmac
690
691@defopt three-step-help
692If this variable is non-@code{nil}, commands defined with
693@code{make-help-screen} display their @var{help-line} strings in the
694echo area at first, and display the longer @var{help-text} strings only
695if the user types the help character again.
696@end defopt
697