Commit 5e887863 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(print_string): Use insert_from_string for output to buffer.

parent c933ea05
......@@ -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. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment