diff options
| author | Lars Ingebrigtsen | 2022-04-17 14:04:34 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2022-04-17 14:06:25 +0200 |
| commit | 2136db067f4292d84553ebfddab30d88b862262e (patch) | |
| tree | 93e1ae6dd32f1e35729858ee4ad4cab8e54c836f /src | |
| parent | 2a848209df79b717b4a309ec6e1b21d021519b16 (diff) | |
| download | emacs-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.c | 12 |
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 | ||
| 771 | DEFUN ("flush-standard-output", Fflush_standard_output, Sflush_standard_output, | ||
| 772 | 0, 0, 0, | ||
| 773 | doc: /* Flush standard-output. | ||
| 774 | This can be useful after using `princ' and the like in scripts. */) | ||
| 775 | (void) | ||
| 776 | { | ||
| 777 | fflush (stdout); | ||
| 778 | return Qnil; | ||
| 779 | } | ||
| 780 | |||
| 771 | DEFUN ("external-debugging-output", Fexternal_debugging_output, Sexternal_debugging_output, 1, 1, 0, | 781 | DEFUN ("external-debugging-output", Fexternal_debugging_output, Sexternal_debugging_output, 1, 1, 0, |
| 772 | doc: /* Write CHARACTER to stderr. | 782 | doc: /* Write CHARACTER to stderr. |
| 773 | You can call `print' while debugging emacs, and pass it this function | 783 | You 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 | |||
| 2549 | be printed. */); | 2559 | be 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 | } |