aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDmitry Antipov2014-07-02 18:00:41 +0400
committerDmitry Antipov2014-07-02 18:00:41 +0400
commit15c1107a30c274e0d5451b4428efc613edabbdce (patch)
tree87250444a6d0fa2af62408175652ca0b02faad1d /src
parentfe1c6a42c96d79106a0ffcc87165148fe7614797 (diff)
downloademacs-15c1107a30c274e0d5451b4428efc613edabbdce.tar.gz
emacs-15c1107a30c274e0d5451b4428efc613edabbdce.zip
* print.c (print_object): Adjust to match new layout of sub char-table
(Bug#17898).
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog1
-rw-r--r--src/print.c12
2 files changed, 11 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 3df37a69527..05916477140 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -15,6 +15,7 @@
15 (map_sub_char_table_for_charset, uniprop_table_uncompress): 15 (map_sub_char_table_for_charset, uniprop_table_uncompress):
16 All related users changed. 16 All related users changed.
17 * lread.c (read1): Adjust to match new layout of sub char-table. 17 * lread.c (read1): Adjust to match new layout of sub char-table.
18 * print.c (print_object): Likewise (Bug#17898).
18 19
192014-07-02 Stefan Monnier <monnier@iro.umontreal.ca> 202014-07-02 Stefan Monnier <monnier@iro.umontreal.ca>
20 21
diff --git a/src/print.c b/src/print.c
index 9b3620765a8..2f52f5d03ec 100644
--- a/src/print.c
+++ b/src/print.c
@@ -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);