summaryrefslogtreecommitdiff
path: root/src/print.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-08-05 22:53:36 +0000
committerRichard M. Stallman <rms@gnu.org>1995-08-05 22:53:36 +0000
commit5e8878637baa007ea7b43cbfcef81d26be3448e2 (patch)
tree077573c18e3ace52d78e1a2f6b1368ae1e9a7058 /src/print.c
parentc933ea05f809c1367a1bcbc9a42a11ffcda66b88 (diff)
downloademacs-5e8878637baa007ea7b43cbfcef81d26be3448e2.tar.gz
(print_string): Use insert_from_string for output to buffer.
Diffstat (limited to 'src/print.c')
-rw-r--r--src/print.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/print.c b/src/print.c
index 1e83d1907e8..fc3411fe290 100644
--- a/src/print.c
+++ b/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. */