aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lispref/help.texi37
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
111in @var{symbol}'s property list under property @var{property}. It 111in @var{symbol}'s property list under property @var{property}. It
112retrieves the text from a file if necessary, and runs 112retrieves 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
114substitution is not done if @var{verbatim} is non-@code{nil}.) 114substitution 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
116file @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
130This function returns the documentation string of @var{function}. It 132This function returns the documentation string of @var{function}. If
131reads the text from a file if necessary. Then (unless @var{verbatim} is 133@var{function} is a symbol, this function looks for a
132non-@code{nil}) it calls @code{substitute-command-keys}, to return a 134@code{function-documentation'} property of that symbol; if it has a
133value containing the actual (current) key bindings. 135non-@code{nil} value, the documentation is taken from that value (if
136the 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
140actual (current) key bindings.
134 141
135The function @code{documentation} signals a @code{void-function} error 142The function @code{documentation} signals a @code{void-function} error
136if @var{function} has no function definition. However, it is OK if 143if @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
379as itself, but a control character turns into a string starting with 386as 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-},
381and space, tab, etc.@: appear as @samp{SPC}, @samp{TAB}, etc. A 388and space, tab, etc.@: appear as @samp{SPC}, @samp{TAB}, etc. A
382function key symbol appears as itself. An event that is a list appears 389function key symbol appears as itsels, but inside angle brackets
383as 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
391in the @sc{car} of the list, inside angle brackets.
392
393If the optional argument @var{no-angles} is non-@code{nil}, the angle
394brackets around function keys and event symbols are omitted; this is
395for compatibility with old versions of Emacs which didn't print the
396brackets.
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