From: Richard M. Stallman Date: Sat, 29 Jun 1996 06:20:14 +0000 (+0000) Subject: (print): Obey Vprint_length for vectors, bitvectors. X-Git-Tag: emacs-19.34~299 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a40384bc10d34f5bb8ed439fc7e0715863f294d0;p=emacs.git (print): Obey Vprint_length for vectors, bitvectors. --- 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 (' ');