From: Noam Postavsky Date: Sun, 28 Jan 2018 23:16:48 +0000 (-0500) Subject: Document external-debugging-output in the Elisp Manual (Bug#24051) X-Git-Tag: emacs-26.1-rc1~279 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2b35ed0b0c49698337758004bd5e6062a3aaffab;p=emacs.git 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. --- diff --git a/doc/lispref/streams.texi b/doc/lispref/streams.texi index bd7dc2d9af3..6172392274a 100644 --- a/doc/lispref/streams.texi +++ b/doc/lispref/streams.texi @@ -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 diff --git a/src/print.c b/src/print.c index d140f9973f5..af1e85f6e7b 100644 --- a/src/print.c +++ b/src/print.c @@ -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) {