diff options
| author | Miles Bader | 2007-08-13 13:48:35 +0000 |
|---|---|---|
| committer | Miles Bader | 2007-08-13 13:48:35 +0000 |
| commit | b2e6b10fe2d40020a75ab0025af98a4abf339cd2 (patch) | |
| tree | db265e5ea93cdc13f8e3b54ed5c7ad2869d50ec9 /src/print.c | |
| parent | 905350bef3ebc514a418658dd155c1d062664b56 (diff) | |
| parent | 37cc095b6a175fb5a2fb18fa029eaf3aa3b3fa53 (diff) | |
| download | emacs-b2e6b10fe2d40020a75ab0025af98a4abf339cd2.tar.gz emacs-b2e6b10fe2d40020a75ab0025af98a4abf339cd2.zip | |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 846-851)
- Update from CVS
- Merge from emacs--rel--22
* emacs--rel--22 (patch 88-92)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 242-244)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-246
Diffstat (limited to 'src/print.c')
| -rw-r--r-- | src/print.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/print.c b/src/print.c index 9ec615de28f..86fd93a5b30 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -94,8 +94,8 @@ Lisp_Object Vfloat_output_format, Qfloat_output_format; | |||
| 94 | /* Avoid actual stack overflow in print. */ | 94 | /* Avoid actual stack overflow in print. */ |
| 95 | int print_depth; | 95 | int print_depth; |
| 96 | 96 | ||
| 97 | /* Nonzero if inside outputting backquote in old style. */ | 97 | /* Level of nesting inside outputting backquote in new style. */ |
| 98 | int old_backquote_output; | 98 | int new_backquote_output; |
| 99 | 99 | ||
| 100 | /* Detect most circularities to print finite output. */ | 100 | /* Detect most circularities to print finite output. */ |
| 101 | #define PRINT_CIRCLE 200 | 101 | #define PRINT_CIRCLE 200 |
| @@ -1291,7 +1291,7 @@ print (obj, printcharfun, escapeflag) | |||
| 1291 | register Lisp_Object printcharfun; | 1291 | register Lisp_Object printcharfun; |
| 1292 | int escapeflag; | 1292 | int escapeflag; |
| 1293 | { | 1293 | { |
| 1294 | old_backquote_output = 0; | 1294 | new_backquote_output = 0; |
| 1295 | 1295 | ||
| 1296 | /* Reset print_number_index and Vprint_number_table only when | 1296 | /* Reset print_number_index and Vprint_number_table only when |
| 1297 | the variable Vprint_continuous_numbering is nil. Otherwise, | 1297 | the variable Vprint_continuous_numbering is nil. Otherwise, |
| @@ -1849,14 +1849,24 @@ print_object (obj, printcharfun, escapeflag) | |||
| 1849 | print_object (XCAR (XCDR (obj)), printcharfun, escapeflag); | 1849 | print_object (XCAR (XCDR (obj)), printcharfun, escapeflag); |
| 1850 | } | 1850 | } |
| 1851 | else if (print_quoted && CONSP (XCDR (obj)) && NILP (XCDR (XCDR (obj))) | 1851 | else if (print_quoted && CONSP (XCDR (obj)) && NILP (XCDR (XCDR (obj))) |
| 1852 | && ! old_backquote_output | 1852 | && ((EQ (XCAR (obj), Qbackquote)))) |
| 1853 | { | ||
| 1854 | print_object (XCAR (obj), printcharfun, 0); | ||
| 1855 | new_backquote_output++; | ||
| 1856 | print_object (XCAR (XCDR (obj)), printcharfun, escapeflag); | ||
| 1857 | new_backquote_output--; | ||
| 1858 | } | ||
| 1859 | else if (print_quoted && CONSP (XCDR (obj)) && NILP (XCDR (XCDR (obj))) | ||
| 1860 | && new_backquote_output | ||
| 1853 | && ((EQ (XCAR (obj), Qbackquote) | 1861 | && ((EQ (XCAR (obj), Qbackquote) |
| 1854 | || EQ (XCAR (obj), Qcomma) | 1862 | || EQ (XCAR (obj), Qcomma) |
| 1855 | || EQ (XCAR (obj), Qcomma_at) | 1863 | || EQ (XCAR (obj), Qcomma_at) |
| 1856 | || EQ (XCAR (obj), Qcomma_dot)))) | 1864 | || EQ (XCAR (obj), Qcomma_dot)))) |
| 1857 | { | 1865 | { |
| 1858 | print_object (XCAR (obj), printcharfun, 0); | 1866 | print_object (XCAR (obj), printcharfun, 0); |
| 1867 | new_backquote_output--; | ||
| 1859 | print_object (XCAR (XCDR (obj)), printcharfun, escapeflag); | 1868 | print_object (XCAR (XCDR (obj)), printcharfun, escapeflag); |
| 1869 | new_backquote_output++; | ||
| 1860 | } | 1870 | } |
| 1861 | else | 1871 | else |
| 1862 | { | 1872 | { |
| @@ -1876,9 +1886,7 @@ print_object (obj, printcharfun, escapeflag) | |||
| 1876 | print_object (Qbackquote, printcharfun, 0); | 1886 | print_object (Qbackquote, printcharfun, 0); |
| 1877 | PRINTCHAR (' '); | 1887 | PRINTCHAR (' '); |
| 1878 | 1888 | ||
| 1879 | ++old_backquote_output; | ||
| 1880 | print_object (XCAR (XCDR (tem)), printcharfun, 0); | 1889 | print_object (XCAR (XCDR (tem)), printcharfun, 0); |
| 1881 | --old_backquote_output; | ||
| 1882 | PRINTCHAR (')'); | 1890 | PRINTCHAR (')'); |
| 1883 | 1891 | ||
| 1884 | obj = XCDR (obj); | 1892 | obj = XCDR (obj); |