aboutsummaryrefslogtreecommitdiffstats
path: root/src/print.c
diff options
context:
space:
mode:
authorJoakim Verona2012-09-03 17:30:17 +0200
committerJoakim Verona2012-09-03 17:30:17 +0200
commit4a37733c693d59a9b83a3fb2d0c7f9461d149f60 (patch)
treea33402e09342f748baebf0e4f5a1e40538e620f4 /src/print.c
parent5436d1df5e2ba0b4d4f72b03a1cd09b20403654b (diff)
parentdcde497f27945c3ca4ce8c21f655ef6f627acdd2 (diff)
downloademacs-4a37733c693d59a9b83a3fb2d0c7f9461d149f60.tar.gz
emacs-4a37733c693d59a9b83a3fb2d0c7f9461d149f60.zip
upstream
Diffstat (limited to 'src/print.c')
-rw-r--r--src/print.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/print.c b/src/print.c
index e7da5a25643..911e009ad25 100644
--- a/src/print.c
+++ b/src/print.c
@@ -199,8 +199,7 @@ int print_output_debug_flag EXTERNALLY_VISIBLE = 1;
199 ? PT - start_point : 0), \ 199 ? PT - start_point : 0), \
200 old_point_byte + (old_point_byte >= start_point_byte \ 200 old_point_byte + (old_point_byte >= start_point_byte \
201 ? PT_BYTE - start_point_byte : 0)); \ 201 ? PT_BYTE - start_point_byte : 0)); \
202 if (old != current_buffer) \ 202 set_buffer_internal (old);
203 set_buffer_internal (old);
204 203
205#define PRINTCHAR(ch) printchar (ch, printcharfun) 204#define PRINTCHAR(ch) printchar (ch, printcharfun)
206 205
@@ -490,7 +489,7 @@ temp_output_buffer_setup (const char *bufname)
490 register struct buffer *old = current_buffer; 489 register struct buffer *old = current_buffer;
491 register Lisp_Object buf; 490 register Lisp_Object buf;
492 491
493 record_unwind_protect (set_buffer_if_live, Fcurrent_buffer ()); 492 record_unwind_current_buffer ();
494 493
495 Fset_buffer (Fget_buffer_create (build_string (bufname))); 494 Fset_buffer (Fget_buffer_create (build_string (bufname)));
496 495
@@ -588,6 +587,7 @@ A printed representation of an object is text which describes that object. */)
588 (Lisp_Object object, Lisp_Object noescape) 587 (Lisp_Object object, Lisp_Object noescape)
589{ 588{
590 Lisp_Object printcharfun; 589 Lisp_Object printcharfun;
590 bool prev_abort_on_gc;
591 /* struct gcpro gcpro1, gcpro2; */ 591 /* struct gcpro gcpro1, gcpro2; */
592 Lisp_Object save_deactivate_mark; 592 Lisp_Object save_deactivate_mark;
593 ptrdiff_t count = SPECPDL_INDEX (); 593 ptrdiff_t count = SPECPDL_INDEX ();
@@ -603,7 +603,8 @@ A printed representation of an object is text which describes that object. */)
603 No need for specbind, since errors deactivate the mark. */ 603 No need for specbind, since errors deactivate the mark. */
604 save_deactivate_mark = Vdeactivate_mark; 604 save_deactivate_mark = Vdeactivate_mark;
605 /* GCPRO2 (object, save_deactivate_mark); */ 605 /* GCPRO2 (object, save_deactivate_mark); */
606 abort_on_gc++; 606 prev_abort_on_gc = abort_on_gc;
607 abort_on_gc = 1;
607 608
608 printcharfun = Vprin1_to_string_buffer; 609 printcharfun = Vprin1_to_string_buffer;
609 PRINTPREPARE; 610 PRINTPREPARE;
@@ -627,7 +628,7 @@ A printed representation of an object is text which describes that object. */)
627 Vdeactivate_mark = save_deactivate_mark; 628 Vdeactivate_mark = save_deactivate_mark;
628 /* UNGCPRO; */ 629 /* UNGCPRO; */
629 630
630 abort_on_gc--; 631 abort_on_gc = prev_abort_on_gc;
631 return unbind_to (count, object); 632 return unbind_to (count, object);
632} 633}
633 634