diff options
author | Miles Bader <miles@gnu.org> | 2007-08-13 13:51:08 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2007-08-13 13:51:08 +0000 |
commit | aaf34461ff5804e5cebe163b31e535da72e81d87 (patch) | |
tree | b096310b459b78e437f08ac0f1f00954840a5db5 /src/print.c | |
parent | 61d032dfd91b811d59acd7605ac02758be97e912 (diff) | |
parent | 37cc095b6a175fb5a2fb18fa029eaf3aa3b3fa53 (diff) | |
download | emacs-aaf34461ff5804e5cebe163b31e535da72e81d87.tar.gz |
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--multi-tty--0--patch-31
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 8b3aaaa1ee9..cd3d6438bff 100644 --- a/src/print.c +++ b/src/print.c @@ -93,8 +93,8 @@ Lisp_Object Vfloat_output_format, Qfloat_output_format; /* Avoid actual stack overflow in print. */ int print_depth; -/* Nonzero if inside outputting backquote in old style. */ -int old_backquote_output; +/* Level of nesting inside outputting backquote in new style. */ +int new_backquote_output; /* Detect most circularities to print finite output. */ #define PRINT_CIRCLE 200 @@ -1291,7 +1291,7 @@ print (obj, printcharfun, escapeflag) register Lisp_Object printcharfun; int escapeflag; { - old_backquote_output = 0; + new_backquote_output = 0; /* Reset print_number_index and Vprint_number_table only when the variable Vprint_continuous_numbering is nil. Otherwise, @@ -1756,14 +1756,24 @@ print_object (obj, printcharfun, escapeflag) print_object (XCAR (XCDR (obj)), printcharfun, escapeflag); } else if (print_quoted && CONSP (XCDR (obj)) && NILP (XCDR (XCDR (obj))) - && ! old_backquote_output + && ((EQ (XCAR (obj), Qbackquote)))) + { + print_object (XCAR (obj), printcharfun, 0); + new_backquote_output++; + print_object (XCAR (XCDR (obj)), printcharfun, escapeflag); + new_backquote_output--; + } + else if (print_quoted && CONSP (XCDR (obj)) && NILP (XCDR (XCDR (obj))) + && new_backquote_output && ((EQ (XCAR (obj), Qbackquote) || EQ (XCAR (obj), Qcomma) || EQ (XCAR (obj), Qcomma_at) || EQ (XCAR (obj), Qcomma_dot)))) { print_object (XCAR (obj), printcharfun, 0); + new_backquote_output--; print_object (XCAR (XCDR (obj)), printcharfun, escapeflag); + new_backquote_output++; } else { @@ -1783,9 +1793,7 @@ print_object (obj, printcharfun, escapeflag) print_object (Qbackquote, printcharfun, 0); PRINTCHAR (' '); - ++old_backquote_output; print_object (XCAR (XCDR (tem)), printcharfun, 0); - --old_backquote_output; PRINTCHAR (')'); obj = XCDR (obj); |