changeset 15563:e47df82909ff

(print): Obey Vprint_length for vectors, bitvectors.
author Richard M. Stallman <rms@gnu.org>
date Sat, 29 Jun 1996 06:20:14 +0000
parents 335159567eb8
children 1e86b1873c5e
files src/print.c
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/print.c	Sat Jun 29 05:04:29 1996 +0000
+++ b/src/print.c	Sat Jun 29 06:20:14 1996 +0000
@@ -1026,6 +1026,12 @@
 	  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 @@
 	  {
 	    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 (' ');