mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-22 19:44:10 +02:00
Use HORIZONTAL ELLIPSIS' when available in
truncated-print'.
* module/ice-9/pretty-print.scm (truncated-print): Set `%default-port-encoding' to the encoding of PORT. Choose either U+2026 or "..." depending on PORT's encoding. * test-suite/tests/print.test ("truncated-print")[tprint]: New ENCODING argument. Update existing tests accordingly. Add UTF-8 tests. * doc/ref/misc-modules.texi (Pretty Printing): Mention the possible use of U+2026.
This commit is contained in:
parent
cc7005bc37
commit
c5e05a1c70
3 changed files with 175 additions and 141 deletions
|
@ -83,9 +83,11 @@ line in which to do so.
|
|||
@print{} #<directory (gui...>
|
||||
@end lisp
|
||||
|
||||
@code{truncated-print} will not output a trailing newline. If an
|
||||
expression does not fit in the given width, it will be truncated --
|
||||
possibly ellipsized, or in the worst case, displayed as @nicode{#}.
|
||||
@code{truncated-print} will not output a trailing newline. If an expression does
|
||||
not fit in the given width, it will be truncated -- possibly
|
||||
ellipsized@footnote{On Unicode-capable ports, the ellipsis is represented by
|
||||
character `HORIZONTAL ELLIPSIS' (U+2026), otherwise it is represented by three
|
||||
dots.}, or in the worst case, displayed as @nicode{#}.
|
||||
|
||||
@deffn {Scheme Procedure} truncated-print obj [port] [keyword-options]
|
||||
Print @var{obj}, truncating the output, if necessary, to make it fit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue