From ca2de34225f857715a8b030261f3102005d7b036 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 9 May 2003 14:03:51 +0000 Subject: [PATCH] (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'. --- src/ChangeLog | 18 ++++++++++++++++++ src/print.c | 19 ++++++++++++------- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index b6af51313b6..b58dfb49fa2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,21 @@ +2003-05-09 Richard M. Stallman + + * print.c (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'. + + * eval.c (specpdl_ptr): Declare volatile. + (unbind_to): Copy the whole binding and decrement specpdl_ptr + before doing the work of unbinding it. + + * lisp.h (struct specbinding): Declare elements volatile. + (specpdl_ptr): Declare volatile. + + * Makefile.in (alloca.o): Specify -DDO_BLOCK_INPUT in compiling. + + * alloca.c: Test DO_BLOCK_INPUT rather than `emacs' + for use of BLOCK_INPUT and inclusion of lisp.h and blockinput.h. + 2003-05-08 Dave Love * coding.c (Vlast_coding_system_used): Doc fix. diff --git a/src/print.c b/src/print.c index 38e82488b3c..dc72539f7f5 100644 --- a/src/print.c +++ b/src/print.c @@ -759,14 +759,18 @@ A printed representation of an object is text which describes that object. */) { 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 @@ A printed representation of an object is text which describes that object. */) 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, -- 2.39.2