emacs-devel
[Top][All Lists]
Advanced

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

Re: recursive load case in openp


From: Richard Stallman
Subject: Re: recursive load case in openp
Date: Thu, 11 Apr 2002 21:12:06 -0600 (MDT)

Does this do the job?

*** coding.c.~1.240.~   Mon Mar 11 22:53:04 2002
--- coding.c    Thu Apr 11 16:02:47 2002
***************
*** 5797,5813 ****
    int count = specpdl_ptr - specpdl;
    struct gcpro gcpro1;
    int multibyte = STRING_MULTIBYTE (str);
  
    record_unwind_protect (Fset_buffer, Fcurrent_buffer ());
    record_unwind_protect (code_convert_region_unwind, Qnil);
    GCPRO1 (str);
!   temp_output_buffer_setup (" *code-converting-work*");
!   set_buffer_internal (XBUFFER (Vstandard_output));
    /* We must insert the contents of STR as is without
       unibyte<->multibyte conversion.  For that, we adjust the
       multibyteness of the working buffer to that of STR.  */
    Ferase_buffer ();
!   current_buffer->enable_multibyte_characters = multibyte ? Qt : Qnil;
    insert_from_string (str, 0, 0,
                      XSTRING (str)->size, STRING_BYTES (XSTRING (str)), 0);
    UNGCPRO;
--- 5797,5826 ----
    int count = specpdl_ptr - specpdl;
    struct gcpro gcpro1;
    int multibyte = STRING_MULTIBYTE (str);
+   Lisp_Object buffer;
+   struct buffer *buf;
  
    record_unwind_protect (Fset_buffer, Fcurrent_buffer ());
    record_unwind_protect (code_convert_region_unwind, Qnil);
    GCPRO1 (str);
! 
!   buffer = Fget_buffer_create (build_string (" *code-converting-work*"));
!   buf = XBUFFER (buffer);
! 
!   buf->directory = current_buffer->directory;
!   buf->read_only = Qnil;
!   buf->filename = Qnil;
!   buf->undo_list = Qt;
!   buf->overlays_before = Qnil;
!   buf->overlays_after = Qnil;
! 
!   set_buffer_internal (buf);
    /* We must insert the contents of STR as is without
       unibyte<->multibyte conversion.  For that, we adjust the
       multibyteness of the working buffer to that of STR.  */
    Ferase_buffer ();
!   buf->enable_multibyte_characters = multibyte ? Qt : Qnil;
! 
    insert_from_string (str, 0, 0,
                      XSTRING (str)->size, STRING_BYTES (XSTRING (str)), 0);
    UNGCPRO;



reply via email to

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