Mercurial > emacs
changeset 50920:997593980303
(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'.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 09 May 2003 14:03:23 +0000 |
parents | bbe405e5721e |
children | 0c19fe613e38 |
files | src/print.c |
diffstat | 1 files changed, 12 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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,