aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier2011-02-23 10:14:21 -0500
committerStefan Monnier2011-02-23 10:14:21 -0500
commit617a0e834a8f3870e28308cd2d04cba6d945f62b (patch)
tree5539d72c5747931b9d1b2136b8388fcfb84ec103 /src
parentd41d18c098709249cb44dcf4bc5fcf8ed4057f29 (diff)
downloademacs-617a0e834a8f3870e28308cd2d04cba6d945f62b.tar.gz
emacs-617a0e834a8f3870e28308cd2d04cba6d945f62b.zip
* src/print.c (print_object): Never print old-style backquotes.
Obey escapeflag for hash tables as well.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/print.c32
2 files changed, 11 insertions, 26 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 194f1c44f84..3d22e15c3b3 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12011-02-23 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * print.c (print_object): Never print old-style backquotes.
4 Obey escapeflag for hash tables as well.
5
12011-02-23 Kenichi Handa <handa@m17n.org> 62011-02-23 Kenichi Handa <handa@m17n.org>
2 7
3 * font.c (font_open_entity): Be sure to set scaled_pixel_size. 8 * font.c (font_open_entity): Be sure to set scaled_pixel_size.
diff --git a/src/print.c b/src/print.c
index 299cfd41814..29a4bfab790 100644
--- a/src/print.c
+++ b/src/print.c
@@ -1683,26 +1683,6 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
1683 { 1683 {
1684 PRINTCHAR ('('); 1684 PRINTCHAR ('(');
1685 1685
1686 /* If the first element is a backquote form,
1687 print it old-style so it won't be misunderstood. */
1688 if (print_quoted && CONSP (XCAR (obj))
1689 && CONSP (XCDR (XCAR (obj)))
1690 && NILP (XCDR (XCDR (XCAR (obj))))
1691 && EQ (XCAR (XCAR (obj)), Qbackquote))
1692 {
1693 Lisp_Object tem;
1694 tem = XCAR (obj);
1695 PRINTCHAR ('(');
1696
1697 print_object (Qbackquote, printcharfun, 0);
1698 PRINTCHAR (' ');
1699
1700 print_object (XCAR (XCDR (tem)), printcharfun, 0);
1701 PRINTCHAR (')');
1702
1703 obj = XCDR (obj);
1704 }
1705
1706 { 1686 {
1707 EMACS_INT print_length; 1687 EMACS_INT print_length;
1708 int i; 1688 int i;
@@ -1906,25 +1886,25 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
1906 if (!NILP (h->test)) 1886 if (!NILP (h->test))
1907 { 1887 {
1908 strout (" test ", -1, -1, printcharfun, 0); 1888 strout (" test ", -1, -1, printcharfun, 0);
1909 print_object (h->test, printcharfun, 0); 1889 print_object (h->test, printcharfun, escapeflag);
1910 } 1890 }
1911 1891
1912 if (!NILP (h->weak)) 1892 if (!NILP (h->weak))
1913 { 1893 {
1914 strout (" weakness ", -1, -1, printcharfun, 0); 1894 strout (" weakness ", -1, -1, printcharfun, 0);
1915 print_object (h->weak, printcharfun, 0); 1895 print_object (h->weak, printcharfun, escapeflag);
1916 } 1896 }
1917 1897
1918 if (!NILP (h->rehash_size)) 1898 if (!NILP (h->rehash_size))
1919 { 1899 {
1920 strout (" rehash-size ", -1, -1, printcharfun, 0); 1900 strout (" rehash-size ", -1, -1, printcharfun, 0);
1921 print_object (h->rehash_size, printcharfun, 0); 1901 print_object (h->rehash_size, printcharfun, escapeflag);
1922 } 1902 }
1923 1903
1924 if (!NILP (h->rehash_threshold)) 1904 if (!NILP (h->rehash_threshold))
1925 { 1905 {
1926 strout (" rehash-threshold ", -1, -1, printcharfun, 0); 1906 strout (" rehash-threshold ", -1, -1, printcharfun, 0);
1927 print_object (h->rehash_threshold, printcharfun, 0); 1907 print_object (h->rehash_threshold, printcharfun, escapeflag);
1928 } 1908 }
1929 1909
1930 strout (" data ", -1, -1, printcharfun, 0); 1910 strout (" data ", -1, -1, printcharfun, 0);
@@ -1943,9 +1923,9 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
1943 if (!NILP (HASH_HASH (h, i))) 1923 if (!NILP (HASH_HASH (h, i)))
1944 { 1924 {
1945 if (i) PRINTCHAR (' '); 1925 if (i) PRINTCHAR (' ');
1946 print_object (HASH_KEY (h, i), printcharfun, 1); 1926 print_object (HASH_KEY (h, i), printcharfun, escapeflag);
1947 PRINTCHAR (' '); 1927 PRINTCHAR (' ');
1948 print_object (HASH_VALUE (h, i), printcharfun, 1); 1928 print_object (HASH_VALUE (h, i), printcharfun, escapeflag);
1949 } 1929 }
1950 1930
1951 if (size < real_size) 1931 if (size < real_size)