emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r117466: * print.c (print_object): Adjust to match n


From: Dmitry Antipov
Subject: [Emacs-diffs] trunk r117466: * print.c (print_object): Adjust to match new layout of sub char-table
Date: Wed, 02 Jul 2014 14:01:07 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117466
revision-id: address@hidden
parent: address@hidden
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Wed 2014-07-02 18:00:41 +0400
message:
  * print.c (print_object): Adjust to match new layout of sub char-table
  (Bug#17898).
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/print.c                    print.c-20091113204419-o5vbwnq5f7feedwu-262
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2014-07-02 03:26:19 +0000
+++ b/src/ChangeLog     2014-07-02 14:00:41 +0000
@@ -15,6 +15,7 @@
        (map_sub_char_table_for_charset, uniprop_table_uncompress):
        All related users changed.
        * lread.c (read1): Adjust to match new layout of sub char-table.
+       * print.c (print_object): Likewise (Bug#17898).
 
 2014-07-02  Stefan Monnier  <address@hidden>
 

=== modified file 'src/print.c'
--- a/src/print.c       2014-07-02 03:26:19 +0000
+++ b/src/print.c       2014-07-02 14:00:41 +0000
@@ -1981,16 +1981,24 @@
 
          PRINTCHAR ('[');
          {
-           register int i;
+           int i, idx = SUB_CHAR_TABLE_P (obj) ? SUB_CHAR_TABLE_OFFSET : 0;
            register Lisp_Object tem;
            ptrdiff_t real_size = size;
 
+           /* For a sub char-table, print heading non-Lisp data first.  */
+           if (SUB_CHAR_TABLE_P (obj))
+             {
+               i = sprintf (buf, "%d %d", XSUB_CHAR_TABLE (obj)->depth,
+                            XSUB_CHAR_TABLE (obj)->min_char);
+               strout (buf, i, i, printcharfun);
+             }
+
            /* Don't print more elements than the specified maximum.  */
            if (NATNUMP (Vprint_length)
                && XFASTINT (Vprint_length) < size)
              size = XFASTINT (Vprint_length);
 
-           for (i = 0; i < size; i++)
+           for (i = idx; i < size; i++)
              {
                if (i) PRINTCHAR (' ');
                tem = AREF (obj, i);


reply via email to

[Prev in Thread] Current Thread [Next in Thread]