summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-06-29 06:20:14 +0000
committerRichard M. Stallman <rms@gnu.org>1996-06-29 06:20:14 +0000
commit1c6b69f535c0d4c376b9dea5eade038a8627304d (patch)
tree5eef79d2d8df6c04c354c3672d563b8665eb68e0
parent3ec747f55866675f824e8724da0a714967778053 (diff)
downloademacs-1c6b69f535c0d4c376b9dea5eade038a8627304d.tar.gz
(print): Obey Vprint_length for vectors, bitvectors.
-rw-r--r--src/print.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/print.c b/src/print.c
index 22b5c140b22..be26917628b 100644
--- a/src/print.c
+++ b/src/print.c
@@ -1026,6 +1026,12 @@ print (obj, printcharfun, escapeflag)
sprintf (buf, "%d", XBOOL_VECTOR (obj)->size);
strout (buf, -1, printcharfun);
PRINTCHAR ('\"');
+
+ /* Don't print more characters than the specified maximum. */
+ if (INTEGERP (Vprint_length)
+ && XINT (Vprint_length) < size_in_chars)
+ size_in_chars = XINT (Vprint_length);
+
for (i = 0; i < size_in_chars; i++)
{
QUIT;
@@ -1124,6 +1130,12 @@ print (obj, printcharfun, escapeflag)
{
register int i;
register Lisp_Object tem;
+
+ /* Don't print more elements than the specified maximum. */
+ if (INTEGERP (Vprint_length)
+ && XINT (Vprint_length) < size)
+ size = XINT (Vprint_length);
+
for (i = 0; i < size; i++)
{
if (i) PRINTCHAR (' ');