emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/print.c


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/src/print.c
Date: Fri, 19 Sep 2003 10:35:41 -0400

Index: emacs/src/print.c
diff -c emacs/src/print.c:1.192 emacs/src/print.c:1.193
*** emacs/src/print.c:1.192     Mon Sep  1 11:45:56 2003
--- emacs/src/print.c   Fri Sep 19 10:35:40 2003
***************
*** 758,790 ****
       (object, noescape)
       Lisp_Object object, noescape;
  {
-   PRINTDECLARE;
    Lisp_Object printcharfun;
    /* 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.  */
!   save_deactivate_mark = Vdeactivate_mark;
!   /* GCPRO2 (object, save_deactivate_mark); */
!   abort_on_gc++;
! 
!   printcharfun = Vprin1_to_string_buffer;
!   PRINTPREPARE;
!   print (object, printcharfun, NILP (noescape));
!   /* Make Vprin1_to_string_buffer be the default buffer after PRINTFINSH */
!   PRINTFINISH;
    set_buffer_internal (XBUFFER (Vprin1_to_string_buffer));
    object = Fbuffer_string ();
    if (SBYTES (object) == SCHARS (object))
      STRING_SET_UNIBYTE (object);
  
    Ferase_buffer ();
!   set_buffer_internal (old);
  
    Vdeactivate_mark = save_deactivate_mark;
    /* UNGCPRO; */
--- 758,799 ----
       (object, noescape)
       Lisp_Object object, noescape;
  {
    Lisp_Object printcharfun;
    /* struct gcpro gcpro1, gcpro2; */
    Lisp_Object save_deactivate_mark;
    int count = specpdl_ptr - specpdl;
+   struct buffer *previous;
  
    specbind (Qinhibit_modification_hooks, Qt);
  
!   {
!     PRINTDECLARE;
! 
!     /* 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.  */
!     save_deactivate_mark = Vdeactivate_mark;
!     /* GCPRO2 (object, save_deactivate_mark); */
!     abort_on_gc++;
! 
!     printcharfun = Vprin1_to_string_buffer;
!     PRINTPREPARE;
!     print (object, printcharfun, NILP (noescape));
!     /* Make Vprin1_to_string_buffer be the default buffer after PRINTFINSH */
!     PRINTFINISH;
!   }
! 
!   previous = current_buffer;
    set_buffer_internal (XBUFFER (Vprin1_to_string_buffer));
    object = Fbuffer_string ();
    if (SBYTES (object) == SCHARS (object))
      STRING_SET_UNIBYTE (object);
  
+   /* Note that this won't make prepare_to_modify_buffer call 
+      ask-user-about-supersession-threat because this buffer
+      does not visit a file.  */
    Ferase_buffer ();
!   set_buffer_internal (previous);
  
    Vdeactivate_mark = save_deactivate_mark;
    /* UNGCPRO; */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]