diff options
| author | Kenichi Handa | 2014-07-05 23:07:57 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2014-07-05 23:07:57 +0900 |
| commit | aeb894a9a06d84d29b93ca04432d7cbed366e665 (patch) | |
| tree | e2b73f9a76bc826c7a443e9a8d4fb3b49bdf7332 /src/print.c | |
| parent | 763a11d0d0dcf543e89a22c98f55ea07c40ceefa (diff) | |
| parent | a984543a4488ed08778eb775d62f7091db117945 (diff) | |
| download | emacs-aeb894a9a06d84d29b93ca04432d7cbed366e665.tar.gz emacs-aeb894a9a06d84d29b93ca04432d7cbed366e665.zip | |
merge trunk
Diffstat (limited to 'src/print.c')
| -rw-r--r-- | src/print.c | 14 |
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); |