aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLars Ingebrigtsen2022-04-17 14:04:34 +0200
committerLars Ingebrigtsen2022-04-17 14:06:25 +0200
commit2136db067f4292d84553ebfddab30d88b862262e (patch)
tree93e1ae6dd32f1e35729858ee4ad4cab8e54c836f /src
parent2a848209df79b717b4a309ec6e1b21d021519b16 (diff)
downloademacs-2136db067f4292d84553ebfddab30d88b862262e.tar.gz
emacs-2136db067f4292d84553ebfddab30d88b862262e.zip
Add new function `flush-standard-output'.
* doc/lispref/streams.texi (Output Functions): Document it. * src/print.c (Fflush_standard_output): New function (bug#15180).
Diffstat (limited to 'src')
-rw-r--r--src/print.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/print.c b/src/print.c
index 4a68d15fe02..baf515047b4 100644
--- a/src/print.c
+++ b/src/print.c
@@ -768,6 +768,16 @@ is used instead. */)
768 return object; 768 return object;
769} 769}
770 770
771DEFUN ("flush-standard-output", Fflush_standard_output, Sflush_standard_output,
772 0, 0, 0,
773 doc: /* Flush standard-output.
774This can be useful after using `princ' and the like in scripts. */)
775 (void)
776{
777 fflush (stdout);
778 return Qnil;
779}
780
771DEFUN ("external-debugging-output", Fexternal_debugging_output, Sexternal_debugging_output, 1, 1, 0, 781DEFUN ("external-debugging-output", Fexternal_debugging_output, Sexternal_debugging_output, 1, 1, 0,
772 doc: /* Write CHARACTER to stderr. 782 doc: /* Write CHARACTER to stderr.
773You can call `print' while debugging emacs, and pass it this function 783You can call `print' while debugging emacs, and pass it this function
@@ -2549,4 +2559,6 @@ printed. If the function returns anything else, the object will not
2549be printed. */); 2559be printed. */);
2550 Vprint_unreadable_function = Qnil; 2560 Vprint_unreadable_function = Qnil;
2551 DEFSYM (Qprint_unreadable_function, "print-unreadable-function"); 2561 DEFSYM (Qprint_unreadable_function, "print-unreadable-function");
2562
2563 defsubr (&Sflush_standard_output);
2552} 2564}