mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-16 08:10:43 -08:00
(print_string): Use insert_from_string for output to buffer.
This commit is contained in:
parent
c933ea05f8
commit
5e8878637b
1 changed files with 10 additions and 2 deletions
12
src/print.c
12
src/print.c
|
|
@ -300,9 +300,17 @@ print_string (string, printcharfun)
|
|||
Lisp_Object string;
|
||||
Lisp_Object printcharfun;
|
||||
{
|
||||
if (EQ (printcharfun, Qnil) || EQ (printcharfun, Qt))
|
||||
/* In predictable cases, strout is safe: output to buffer or frame. */
|
||||
if (EQ (printcharfun, Qt))
|
||||
/* strout is safe for output to a frame (echo area). */
|
||||
strout (XSTRING (string)->data, XSTRING (string)->size, printcharfun);
|
||||
else if (EQ (printcharfun, Qnil))
|
||||
{
|
||||
#ifdef MAX_PRINT_CHARS
|
||||
if (max_print)
|
||||
print_chars += XSTRING (string)->size;
|
||||
#endif /* MAX_PRINT_CHARS */
|
||||
insert_from_string (string, 0, XSTRING (string)->size, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Otherwise, fetch the string address for each character. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue