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 /lisp | |
| 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 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl-extra.el | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ef1bdfba0d6..87852d64a46 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2014-10-08 Leo Liu <sdl.web@gmail.com> | ||
| 2 | |||
| 3 | * emacs-lisp/cl-extra.el (cl-fresh-line): New function. | ||
| 4 | |||
| 1 | 2014-10-08 Glenn Morris <rgm@gnu.org> | 5 | 2014-10-08 Glenn Morris <rgm@gnu.org> |
| 2 | 6 | ||
| 3 | * calendar/cal-x.el (calendar-dedicate-diary): | 7 | * calendar/cal-x.el (calendar-dedicate-diary): |
diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el index e10844069ef..a7970261608 100644 --- a/lisp/emacs-lisp/cl-extra.el +++ b/lisp/emacs-lisp/cl-extra.el | |||
| @@ -647,6 +647,13 @@ PROPLIST is a list of the sort returned by `symbol-plist'. | |||
| 647 | (progn (setplist sym (cdr (cdr plist))) t) | 647 | (progn (setplist sym (cdr (cdr plist))) t) |
| 648 | (cl--do-remf plist tag)))) | 648 | (cl--do-remf plist tag)))) |
| 649 | 649 | ||
| 650 | ;;; Streams. | ||
| 651 | |||
| 652 | ;;;###autoload | ||
| 653 | (defun cl-fresh-line (&optional stream) | ||
| 654 | "Output a newline unless already at the beginning of a line." | ||
| 655 | (terpri stream 'ensure)) | ||
| 656 | |||
| 650 | ;;; Some debugging aids. | 657 | ;;; Some debugging aids. |
| 651 | 658 | ||
| 652 | (defun cl-prettyprint (form) | 659 | (defun cl-prettyprint (form) |