aboutsummaryrefslogtreecommitdiffstats
path: root/src/print.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/print.c')
-rw-r--r--src/print.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/print.c b/src/print.c
index 9050a0cb773..2f52f5d03ec 100644
--- a/src/print.c
+++ b/src/print.c
@@ -1968,7 +1968,7 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag)
1968 Otherwise we'll make a line extremely long, which 1968 Otherwise we'll make a line extremely long, which
1969 results in slow redisplay. */ 1969 results in slow redisplay. */
1970 if (SUB_CHAR_TABLE_P (obj) 1970 if (SUB_CHAR_TABLE_P (obj)
1971 && XINT (XSUB_CHAR_TABLE (obj)->depth) == 3) 1971 && XSUB_CHAR_TABLE (obj)->depth == 3)
1972 PRINTCHAR ('\n'); 1972 PRINTCHAR ('\n');
1973 PRINTCHAR ('#'); 1973 PRINTCHAR ('#');
1974 PRINTCHAR ('^'); 1974 PRINTCHAR ('^');
@@ -1981,16 +1981,24 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag)
1981 1981
1982 PRINTCHAR ('['); 1982 PRINTCHAR ('[');
1983 { 1983 {
1984 register int i; 1984 int i, idx = SUB_CHAR_TABLE_P (obj) ? SUB_CHAR_TABLE_OFFSET : 0;
1985 register Lisp_Object tem; 1985 register Lisp_Object tem;
1986 ptrdiff_t real_size = size; 1986 ptrdiff_t real_size = size;
1987 1987
1988 /* For a sub char-table, print heading non-Lisp data first. */
1989 if (SUB_CHAR_TABLE_P (obj))
1990 {
1991 i = sprintf (buf, "%d %d", XSUB_CHAR_TABLE (obj)->depth,
1992 XSUB_CHAR_TABLE (obj)->min_char);
1993 strout (buf, i, i, printcharfun);
1994 }
1995
1988 /* Don't print more elements than the specified maximum. */ 1996 /* Don't print more elements than the specified maximum. */
1989 if (NATNUMP (Vprint_length) 1997 if (NATNUMP (Vprint_length)
1990 && XFASTINT (Vprint_length) < size) 1998 && XFASTINT (Vprint_length) < size)
1991 size = XFASTINT (Vprint_length); 1999 size = XFASTINT (Vprint_length);
1992 2000
1993 for (i = 0; i < size; i++) 2001 for (i = idx; i < size; i++)
1994 { 2002 {
1995 if (i) PRINTCHAR (' '); 2003 if (i) PRINTCHAR (' ');
1996 tem = AREF (obj, i); 2004 tem = AREF (obj, i);