Changeset 3872
- Timestamp:
- 09/16/05 02:00:21 (3 years ago)
- Files:
-
- trunk/src/ChangeLog.Meadow (modified) (1 diff)
- trunk/src/coding.c (modified) (9 diffs)
- trunk/src/fileio.c (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/ChangeLog.Meadow
r3871 r3872 1 1 2005-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. 2 14 3 15 * mw32term.h (Vw32_system_coding_system): removed. trunk/src/coding.c
r3809 r3872 5354 5354 } while (0) 5355 5355 5356 /* ARG is (CODING . BUFFER) where CODING is what to be set in5357 Vlast_coding_system_used and BUFFER if non-nil is a bufferto5356 /* ARG is (CODING BUFFER ...) where CODING is what to be set in 5357 Vlast_coding_system_used and the remaining elements are buffers to 5358 5358 kill. */ 5359 5359 static Lisp_Object … … 5363 5363 inhibit_pre_post_conversion = 0; 5364 5364 Vlast_coding_system_used = XCAR (arg); 5365 if (! NILP (XCDR (arg)))5366 Fkill_buffer (XC DR (arg));5365 for (arg = XCDR (arg); ! NILP (arg); arg = XCDR (arg)) 5366 Fkill_buffer (XCAR (arg)); 5367 5367 return Qnil; 5368 5368 } … … 5908 5908 else 5909 5909 { 5910 float ratio = (float) (coding->produced - coding->consumed);5910 float ratio = coding->produced - coding->consumed; 5911 5911 ratio /= coding->consumed; 5912 require = (int) (len_byte * ratio);5912 require = len_byte * ratio; 5913 5913 } 5914 5914 first = 0; … … 6082 6082 Lisp_Object old_deactivate_mark; 6083 6083 Lisp_Object buffer_to_kill; 6084 Lisp_Object unwind_arg; 6084 6085 6085 6086 record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); … … 6092 6093 multibyteness of the working buffer to that of STR. */ 6093 6094 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); 6096 6100 6097 6101 insert_from_string (str, 0, 0, … … 6100 6104 inhibit_pre_post_conversion = 1; 6101 6105 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 } 6103 6114 else 6104 6115 { … … 6134 6145 struct gcpro gcpro1, gcpro2; 6135 6146 struct buffer *cur = current_buffer; 6147 struct buffer *prev; 6136 6148 Lisp_Object old_deactivate_mark, old_last_coding_system_used; 6137 6149 Lisp_Object args[3]; … … 6150 6162 UNGCPRO; 6151 6163 inhibit_pre_post_conversion = 1; 6164 prev = current_buffer; 6152 6165 args[0] = coding->pre_write_conversion; 6153 6166 args[1] = make_number (BEG); … … 6169 6182 coding->src_multibyte 6170 6183 = ! NILP (current_buffer->enable_multibyte_characters); 6184 if (prev != current_buffer) 6185 Fkill_buffer (Fcurrent_buffer ()); 6171 6186 set_buffer_internal (cur); 6172 6187 if (! NILP (buffer_to_kill)) trunk/src/fileio.c
r3809 r3872 1064 1064 int length; 1065 1065 Lisp_Object handler, result; 1066 int multibyte; 1066 1067 1067 1068 CHECK_STRING (name); … … 1141 1142 name = FILE_SYSTEM_CASE (name); 1142 1143 nm = SDATA (name); 1144 multibyte = STRING_MULTIBYTE (name); 1143 1145 1144 1146 #ifdef DOS_NT … … 1306 1308 { 1307 1309 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); 1310 1311 } 1311 1312 #endif /* VMS */ … … 1319 1320 { 1320 1321 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); 1323 1323 } 1324 1324 else … … 1329 1329 char temp[] = " :"; 1330 1330 1331 name = make_specified_string (nm, -1, p - nm, 1332 STRING_MULTIBYTE (name)); 1331 name = make_specified_string (nm, -1, p - nm, multibyte); 1333 1332 temp[0] = DRIVE_LETTER (drive); 1334 1333 name = concat2 (build_string (temp), name); … … 1338 1337 if (nm == SDATA (name)) 1339 1338 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); 1342 1340 #endif /* not DOS_NT */ 1343 1341 } … … 1451 1449 { 1452 1450 newdir = SDATA (default_directory); 1451 multibyte |= STRING_MULTIBYTE (default_directory); 1453 1452 #ifdef DOS_NT 1454 1453 /* Note if special escape prefix is present, but remove for now. */ … … 1716 1715 #endif /* DOS_NT */ 1717 1716 1718 result = make_specified_string (target, -1, o - target, 1719 STRING_MULTIBYTE (name)); 1717 result = make_specified_string (target, -1, o - target, multibyte); 1720 1718 1721 1719 /* Again look to see if the file name has special constructs in it … … 5777 5775 int i, nbytes; 5778 5776 struct gcpro gcpro1; 5777 char *msgbuf; 5778 USE_SAFE_ALLOCA; 5779 5779 5780 5780 ring_bell (); … … 5786 5786 GCPRO1 (msg); 5787 5787 nbytes = SBYTES (msg); 5788 SAFE_ALLOCA (msgbuf, char *, nbytes); 5789 bcopy (SDATA (msg), msgbuf, nbytes); 5788 5790 5789 5791 for (i = 0; i < 3; ++i) 5790 5792 { 5791 5793 if (i == 0) 5792 message2 ( SDATA (msg), nbytes, STRING_MULTIBYTE (msg));5794 message2 (msgbuf, nbytes, STRING_MULTIBYTE (msg)); 5793 5795 else 5794 message2_nolog ( SDATA (msg), nbytes, STRING_MULTIBYTE (msg));5796 message2_nolog (msgbuf, nbytes, STRING_MULTIBYTE (msg)); 5795 5797 Fsleep_for (make_number (1), Qnil); 5796 5798 }
