From a40384bc10d34f5bb8ed439fc7e0715863f294d0 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 29 Jun 1996 06:20:14 +0000 Subject: [PATCH] (print): Obey Vprint_length for vectors, bitvectors. --- src/print.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 (' '); -- 2.39.2