mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
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)
This commit is contained in:
parent
289a43910e
commit
2dbd7a37a8
12 changed files with 125 additions and 13 deletions
|
|
@ -647,6 +647,13 @@ PROPLIST is a list of the sort returned by `symbol-plist'.
|
|||
(progn (setplist sym (cdr (cdr plist))) t)
|
||||
(cl--do-remf plist tag))))
|
||||
|
||||
;;; Streams.
|
||||
|
||||
;;;###autoload
|
||||
(defun cl-fresh-line (&optional stream)
|
||||
"Output a newline unless already at the beginning of a line."
|
||||
(terpri stream 'ensure))
|
||||
|
||||
;;; Some debugging aids.
|
||||
|
||||
(defun cl-prettyprint (form)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue