diff options
| author | Leo Liu | 2014-10-09 06:05:48 +0800 |
|---|---|---|
| committer | Leo Liu | 2014-10-09 06:05:48 +0800 |
| commit | 2dbd7a37a809e2dcef6c8e7323ac15c98b051cd9 (patch) | |
| tree | 3325d872642948f831a9acb971a2c06ce7d10b4d /doc/lispref | |
| parent | 289a43910e29999f125d76a48602b63cea7ed9b9 (diff) | |
| download | emacs-2dbd7a37a809e2dcef6c8e7323ac15c98b051cd9.tar.gz emacs-2dbd7a37a809e2dcef6c8e7323ac15c98b051cd9.zip | |
Enhance terpri to allow conditionally output a newline
* doc/lispref/streams.texi (Output Functions): Document new argument ENSURE to
terpri.
* doc/misc/cl.texi (Porting Common Lisp): Remove parse-integer.
* lisp/emacs-lisp/cl-extra.el (cl-fresh-line): New function.
* src/keymap.c (describe_vector_princ):
* src/keyboard.c (Fcommand_error_default_function): Adapt to change to
Fterpri.
* src/print.c (printchar_stdout_last): Declare.
(printchar): Record the last char written to stdout.
(Fterpri): Add optional argument ENSURE.
* test/automated/print-tests.el: New file.
(terpri): Tests for terpri. (Bug#18652)
Diffstat (limited to 'doc/lispref')
| -rw-r--r-- | doc/lispref/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/lispref/streams.texi | 9 |
2 files changed, 11 insertions, 3 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 510f9e983c3..4d4d0b529cc 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-10-08 Leo Liu <sdl.web@gmail.com> | ||
| 2 | |||
| 3 | * streams.texi (Output Functions): Document new argument ENSURE to | ||
| 4 | terpri. (Bug#18652) | ||
| 5 | |||
| 1 | 2014-10-04 Martin Rudalics <rudalics@gmx.at> | 6 | 2014-10-04 Martin Rudalics <rudalics@gmx.at> |
| 2 | 7 | ||
| 3 | * display.texi (Scroll Bars): Add description of horizontal scroll | 8 | * display.texi (Scroll Bars): Add description of horizontal scroll |
diff --git a/doc/lispref/streams.texi b/doc/lispref/streams.texi index 1d549ae8916..c287b617713 100644 --- a/doc/lispref/streams.texi +++ b/doc/lispref/streams.texi | |||
| @@ -615,10 +615,13 @@ spacing between calls. | |||
| 615 | @end example | 615 | @end example |
| 616 | @end defun | 616 | @end defun |
| 617 | 617 | ||
| 618 | @defun terpri &optional stream | 618 | @defun terpri &optional stream ensure |
| 619 | @cindex newline in print | 619 | @cindex newline in print |
| 620 | This function outputs a newline to @var{stream}. The name stands | 620 | This function outputs a newline to @var{stream}. The name stands for |
| 621 | for ``terminate print''. | 621 | ``terminate print''. If @var{ensure} is non-nil no newline is printed |
| 622 | if @var{stream} is already at the beginning of a line. Note in this | ||
| 623 | case @var{stream} can not be a function and an error is signalled if | ||
| 624 | it is. This function returns @code{t} if a newline is printed. | ||
| 622 | @end defun | 625 | @end defun |
| 623 | 626 | ||
| 624 | @defun write-char character &optional stream | 627 | @defun write-char character &optional stream |