# HG changeset patch # User Richard M. Stallman # Date 1052489003 0 # Node ID 997593980303e520a32ea9665498d04a8d384d3c # Parent bbe405e5721ec4f3742e63c978f920d479c103f7 (Fprin1_to_string): Instead of gcpro, set abort_on_gc. Bind Qinhibit_modification_hooks to t so there will be no GC. Rename local `tem' to `save_deactivate_mark'. diff -r bbe405e5721e -r 997593980303 src/print.c --- a/src/print.c Fri May 09 14:01:12 2003 +0000 +++ b/src/print.c Fri May 09 14:03:23 2003 +0000 @@ -759,14 +759,18 @@ { PRINTDECLARE; Lisp_Object printcharfun; - struct gcpro gcpro1, gcpro2; - Lisp_Object tem; + /* struct gcpro gcpro1, gcpro2; */ + Lisp_Object save_deactivate_mark; + int count = specpdl_ptr - specpdl; + + specbind (Qinhibit_modification_hooks, Qt); /* Save and restore this--we are altering a buffer but we don't want to deactivate the mark just for that. No need for specbind, since errors deactivate the mark. */ - tem = Vdeactivate_mark; - GCPRO2 (object, tem); + save_deactivate_mark = Vdeactivate_mark; + /* GCPRO2 (object, save_deactivate_mark); */ + abort_on_gc++; printcharfun = Vprin1_to_string_buffer; PRINTPREPARE; @@ -781,10 +785,11 @@ Ferase_buffer (); set_buffer_internal (old); - Vdeactivate_mark = tem; - UNGCPRO; + Vdeactivate_mark = save_deactivate_mark; + /* UNGCPRO; */ - return object; + abort_on_gc--; + return unbind_to (count, object); } DEFUN ("princ", Fprinc, Sprinc, 1, 2, 0,