Changeset 3872

Show
Ignore:
Timestamp:
09/16/05 02:00:21 (3 years ago)
Author:
horiguti
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/ChangeLog.Meadow

    r3871 r3872  
    112005-09-15  Kyotaro HORIGUCHI  <horiguti@meadowy.org> 
     2 
     3        * fileio.c (expand-file-name): Bug fix for multibyte 
     4        default-directory syncing up with Emacs CVS HEAD (1.554) 
     5        (auto_save_error): Pass copy of lisp string to message2 syncing up 
     6        with Emacs CVS HEAD. (1.553) 
     7         
     8        * coding.c (code_convert_region_unwind): Sync up with Emacs CVS 
     9        HEAD(1.325). Argument format changed. 
     10        (run_pre_post_conversion_on_str): Sync up with Emacs CVS 
     11        HEAD(1.325). If pre-write-conversion function changed the current 
     12        buffer, delete the new buffer. 
     13        (run_pre_write_conversin_on_c_str): Likewise. 
    214 
    315        * mw32term.h (Vw32_system_coding_system): removed. 
  • trunk/src/coding.c

    r3809 r3872  
    53545354  } while (0) 
    53555355 
    5356 /* ARG is (CODING . BUFFER) where CODING is what to be set in 
    5357    Vlast_coding_system_used and BUFFER if non-nil is a buffer to 
     5356/* ARG is (CODING BUFFER ...) where CODING is what to be set in 
     5357   Vlast_coding_system_used and the remaining elements are buffers to 
    53585358   kill.  */ 
    53595359static Lisp_Object 
     
    53635363  inhibit_pre_post_conversion = 0; 
    53645364  Vlast_coding_system_used = XCAR (arg); 
    5365   if (! NILP (XCDR (arg))) 
    5366     Fkill_buffer (XCDR (arg)); 
     5365  for (arg = XCDR (arg); ! NILP (arg); arg = XCDR (arg)) 
     5366    Fkill_buffer (XCAR (arg)); 
    53675367  return Qnil; 
    53685368} 
     
    59085908          else 
    59095909            { 
    5910               float ratio = (float) (coding->produced - coding->consumed)
     5910              float ratio = coding->produced - coding->consumed
    59115911              ratio /= coding->consumed; 
    5912               require = (int) (len_byte * ratio)
     5912              require = len_byte * ratio
    59135913            } 
    59145914          first = 0; 
     
    60826082  Lisp_Object old_deactivate_mark; 
    60836083  Lisp_Object buffer_to_kill; 
     6084  Lisp_Object unwind_arg; 
    60846085 
    60856086  record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); 
     
    60926093     multibyteness of the working buffer to that of STR.  */ 
    60936094  buffer_to_kill = set_conversion_work_buffer (multibyte); 
    6094   record_unwind_protect (code_convert_region_unwind, 
    6095                          Fcons (Vlast_coding_system_used, buffer_to_kill)); 
     6095  if (NILP (buffer_to_kill)) 
     6096    unwind_arg = Fcons (Vlast_coding_system_used, Qnil); 
     6097  else 
     6098    unwind_arg = list2 (Vlast_coding_system_used, buffer_to_kill); 
     6099  record_unwind_protect (code_convert_region_unwind, unwind_arg); 
    60966100 
    60976101  insert_from_string (str, 0, 0, 
     
    61006104  inhibit_pre_post_conversion = 1; 
    61016105  if (encodep) 
    6102     call2 (coding->pre_write_conversion, make_number (BEG), make_number (Z)); 
     6106    { 
     6107      struct buffer *prev = current_buffer; 
     6108 
     6109      call2 (coding->pre_write_conversion, make_number (BEG), make_number (Z)); 
     6110      if (prev != current_buffer) 
     6111        /* We must kill the current buffer too.  */ 
     6112        Fsetcdr (unwind_arg, Fcons (Fcurrent_buffer (), XCDR (unwind_arg))); 
     6113    } 
    61036114  else 
    61046115    { 
     
    61346145  struct gcpro gcpro1, gcpro2; 
    61356146  struct buffer *cur = current_buffer; 
     6147  struct buffer *prev; 
    61366148  Lisp_Object old_deactivate_mark, old_last_coding_system_used; 
    61376149  Lisp_Object args[3]; 
     
    61506162  UNGCPRO; 
    61516163  inhibit_pre_post_conversion = 1; 
     6164  prev = current_buffer; 
    61526165  args[0] = coding->pre_write_conversion; 
    61536166  args[1] = make_number (BEG); 
     
    61696182  coding->src_multibyte 
    61706183    = ! NILP (current_buffer->enable_multibyte_characters); 
     6184  if (prev != current_buffer) 
     6185    Fkill_buffer (Fcurrent_buffer ()); 
    61716186  set_buffer_internal (cur); 
    61726187  if (! NILP (buffer_to_kill)) 
  • trunk/src/fileio.c

    r3809 r3872  
    10641064  int length; 
    10651065  Lisp_Object handler, result; 
     1066  int multibyte; 
    10661067 
    10671068  CHECK_STRING (name); 
     
    11411142  name = FILE_SYSTEM_CASE (name); 
    11421143  nm = SDATA (name); 
     1144  multibyte = STRING_MULTIBYTE (name); 
    11431145 
    11441146#ifdef DOS_NT 
     
    13061308            { 
    13071309              nm = sys_translate_unix (nm); 
    1308               return make_specified_string (nm, -1, strlen (nm), 
    1309                                             STRING_MULTIBYTE (name)); 
     1310              return make_specified_string (nm, -1, strlen (nm), multibyte); 
    13101311            } 
    13111312#endif /* VMS */ 
     
    13191320            { 
    13201321              if (strcmp (nm, SDATA (name)) != 0) 
    1321                 name = make_specified_string (nm, -1, strlen (nm), 
    1322                                               STRING_MULTIBYTE (name)); 
     1322                name = make_specified_string (nm, -1, strlen (nm), multibyte); 
    13231323            } 
    13241324          else 
     
    13291329              char temp[] = " :"; 
    13301330 
    1331               name = make_specified_string (nm, -1, p - nm, 
    1332                                             STRING_MULTIBYTE (name)); 
     1331              name = make_specified_string (nm, -1, p - nm, multibyte); 
    13331332              temp[0] = DRIVE_LETTER (drive); 
    13341333              name = concat2 (build_string (temp), name); 
     
    13381337          if (nm == SDATA (name)) 
    13391338            return name; 
    1340           return make_specified_string (nm, -1, strlen (nm), 
    1341                                         STRING_MULTIBYTE (name)); 
     1339          return make_specified_string (nm, -1, strlen (nm), multibyte); 
    13421340#endif /* not DOS_NT */ 
    13431341        } 
     
    14511449    { 
    14521450      newdir = SDATA (default_directory); 
     1451      multibyte |= STRING_MULTIBYTE (default_directory); 
    14531452#ifdef DOS_NT 
    14541453      /* Note if special escape prefix is present, but remove for now.  */ 
     
    17161715#endif /* DOS_NT */ 
    17171716 
    1718   result = make_specified_string (target, -1, o - target, 
    1719                                   STRING_MULTIBYTE (name)); 
     1717  result = make_specified_string (target, -1, o - target, multibyte); 
    17201718 
    17211719  /* Again look to see if the file name has special constructs in it 
     
    57775775  int i, nbytes; 
    57785776  struct gcpro gcpro1; 
     5777  char *msgbuf; 
     5778  USE_SAFE_ALLOCA; 
    57795779 
    57805780  ring_bell (); 
     
    57865786  GCPRO1 (msg); 
    57875787  nbytes = SBYTES (msg); 
     5788  SAFE_ALLOCA (msgbuf, char *, nbytes); 
     5789  bcopy (SDATA (msg), msgbuf, nbytes); 
    57885790 
    57895791  for (i = 0; i < 3; ++i) 
    57905792    { 
    57915793      if (i == 0) 
    5792         message2 (SDATA (msg), nbytes, STRING_MULTIBYTE (msg)); 
     5794        message2 (msgbuf, nbytes, STRING_MULTIBYTE (msg)); 
    57935795      else 
    5794         message2_nolog (SDATA (msg), nbytes, STRING_MULTIBYTE (msg)); 
     5796        message2_nolog (msgbuf, nbytes, STRING_MULTIBYTE (msg)); 
    57955797      Fsleep_for (make_number (1), Qnil); 
    57965798    }