1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-27 07:37:33 +00:00

Document external-debugging-output in the Elisp Manual (Bug#24051)

* doc/lispref/streams.texi (Output Streams): List
external-debugging-output.
* src/print.c (Fexternal_debugging_output): Quote `print' in
docstring.
This commit is contained in:
Noam Postavsky 2018-01-28 18:16:48 -05:00
parent db6564cde0
commit 2b35ed0b0c
2 changed files with 21 additions and 4 deletions

View File

@ -503,7 +503,7 @@ in reverse order.
@end group
@group
(print "This is the output" 'eat-output)
(print "This is the output" #'eat-output)
@result{} "This is the output"
@end group
@ -530,6 +530,22 @@ Now we can put the output in the proper order by reversing the list:
Calling @code{concat} converts the list to a string so you can see its
contents more clearly.
@cindex @code{stderr} stream, use for debugging
@anchor{external-debugging-output}
@defun external-debugging-output character
This function can be useful as an output stream when debugging. It
writes @var{character} to the standard error stream.
For example
@example
@group
(print "This is the output" #'external-debugging-output)
@print{} This is the output
@result{} "This is the output"
@end group
@end example
@end defun
@node Output Functions
@section Output Functions
@ -570,8 +586,9 @@ operation:
@end example
In the functions below, @var{stream} stands for an output stream.
(See the previous section for a description of output streams.) If
@var{stream} is @code{nil} or omitted, it defaults to the value of
(See the previous section for a description of output streams. Also
@xref{external-debugging-output}, a useful stream value for debugging.)
If @var{stream} is @code{nil} or omitted, it defaults to the value of
@code{standard-output}.
@defun print object &optional stream

View File

@ -748,7 +748,7 @@ is used instead. */)
DEFUN ("external-debugging-output", Fexternal_debugging_output, Sexternal_debugging_output, 1, 1, 0,
doc: /* Write CHARACTER to stderr.
You can call print while debugging emacs, and pass it this function
You can call `print' while debugging emacs, and pass it this function
to make it write to the debugging output. */)
(Lisp_Object character)
{