diff options
| author | Kenichi Handa | 2005-09-14 02:18:49 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2005-09-14 02:18:49 +0000 |
| commit | 2b046a720b0564ae3f8685cb153370586c87e17c (patch) | |
| tree | 725edf1f30b1759ebef47c0786cc20e672c97bfb | |
| parent | 774d7c683a58ec1a3775ff6fa92487c0ad4ca76d (diff) | |
| download | emacs-2b046a720b0564ae3f8685cb153370586c87e17c.tar.gz emacs-2b046a720b0564ae3f8685cb153370586c87e17c.zip | |
(Fexpand_file_name): Check multibyteness of
default_directory.
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/fileio.c | 18 |
2 files changed, 13 insertions, 10 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 4c97d751c45..44fcf21a242 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2005-09-14 Kenichi Handa <handa@m17n.org> | ||
| 2 | |||
| 3 | * fileio.c (Fexpand_file_name): Check multibyteness of | ||
| 4 | default_directory. | ||
| 5 | |||
| 1 | 2005-09-13 Kenichi Handa <handa@m17n.org> | 6 | 2005-09-13 Kenichi Handa <handa@m17n.org> |
| 2 | 7 | ||
| 3 | * composite.c (compose_chars_in_text): Delete it. | 8 | * composite.c (compose_chars_in_text): Delete it. |
diff --git a/src/fileio.c b/src/fileio.c index a51371be0e6..cd4eaa800fd 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -1056,6 +1056,7 @@ See also the function `substitute-in-file-name'. */) | |||
| 1056 | #endif /* DOS_NT */ | 1056 | #endif /* DOS_NT */ |
| 1057 | int length; | 1057 | int length; |
| 1058 | Lisp_Object handler, result; | 1058 | Lisp_Object handler, result; |
| 1059 | int multibyte; | ||
| 1059 | 1060 | ||
| 1060 | CHECK_STRING (name); | 1061 | CHECK_STRING (name); |
| 1061 | 1062 | ||
| @@ -1133,6 +1134,7 @@ See also the function `substitute-in-file-name'. */) | |||
| 1133 | 1134 | ||
| 1134 | name = FILE_SYSTEM_CASE (name); | 1135 | name = FILE_SYSTEM_CASE (name); |
| 1135 | nm = SDATA (name); | 1136 | nm = SDATA (name); |
| 1137 | multibyte = STRING_MULTIBYTE (name); | ||
| 1136 | 1138 | ||
| 1137 | #ifdef DOS_NT | 1139 | #ifdef DOS_NT |
| 1138 | /* We will force directory separators to be either all \ or /, so make | 1140 | /* We will force directory separators to be either all \ or /, so make |
| @@ -1298,8 +1300,7 @@ See also the function `substitute-in-file-name'. */) | |||
| 1298 | if (index (nm, '/')) | 1300 | if (index (nm, '/')) |
| 1299 | { | 1301 | { |
| 1300 | nm = sys_translate_unix (nm); | 1302 | nm = sys_translate_unix (nm); |
| 1301 | return make_specified_string (nm, -1, strlen (nm), | 1303 | return make_specified_string (nm, -1, strlen (nm), multibyte); |
| 1302 | STRING_MULTIBYTE (name)); | ||
| 1303 | } | 1304 | } |
| 1304 | #endif /* VMS */ | 1305 | #endif /* VMS */ |
| 1305 | #ifdef DOS_NT | 1306 | #ifdef DOS_NT |
| @@ -1311,8 +1312,7 @@ See also the function `substitute-in-file-name'. */) | |||
| 1311 | if (IS_DIRECTORY_SEP (nm[1])) | 1312 | if (IS_DIRECTORY_SEP (nm[1])) |
| 1312 | { | 1313 | { |
| 1313 | if (strcmp (nm, SDATA (name)) != 0) | 1314 | if (strcmp (nm, SDATA (name)) != 0) |
| 1314 | name = make_specified_string (nm, -1, strlen (nm), | 1315 | name = make_specified_string (nm, -1, strlen (nm), multibyte); |
| 1315 | STRING_MULTIBYTE (name)); | ||
| 1316 | } | 1316 | } |
| 1317 | else | 1317 | else |
| 1318 | #endif | 1318 | #endif |
| @@ -1321,8 +1321,7 @@ See also the function `substitute-in-file-name'. */) | |||
| 1321 | { | 1321 | { |
| 1322 | char temp[] = " :"; | 1322 | char temp[] = " :"; |
| 1323 | 1323 | ||
| 1324 | name = make_specified_string (nm, -1, p - nm, | 1324 | name = make_specified_string (nm, -1, p - nm, multibyte); |
| 1325 | STRING_MULTIBYTE (name)); | ||
| 1326 | temp[0] = DRIVE_LETTER (drive); | 1325 | temp[0] = DRIVE_LETTER (drive); |
| 1327 | name = concat2 (build_string (temp), name); | 1326 | name = concat2 (build_string (temp), name); |
| 1328 | } | 1327 | } |
| @@ -1330,8 +1329,7 @@ See also the function `substitute-in-file-name'. */) | |||
| 1330 | #else /* not DOS_NT */ | 1329 | #else /* not DOS_NT */ |
| 1331 | if (nm == SDATA (name)) | 1330 | if (nm == SDATA (name)) |
| 1332 | return name; | 1331 | return name; |
| 1333 | return make_specified_string (nm, -1, strlen (nm), | 1332 | return make_specified_string (nm, -1, strlen (nm), multibyte); |
| 1334 | STRING_MULTIBYTE (name)); | ||
| 1335 | #endif /* not DOS_NT */ | 1333 | #endif /* not DOS_NT */ |
| 1336 | } | 1334 | } |
| 1337 | } | 1335 | } |
| @@ -1443,6 +1441,7 @@ See also the function `substitute-in-file-name'. */) | |||
| 1443 | && !newdir) | 1441 | && !newdir) |
| 1444 | { | 1442 | { |
| 1445 | newdir = SDATA (default_directory); | 1443 | newdir = SDATA (default_directory); |
| 1444 | multibyte |= STRING_MULTIBYTE (default_directory); | ||
| 1446 | #ifdef DOS_NT | 1445 | #ifdef DOS_NT |
| 1447 | /* Note if special escape prefix is present, but remove for now. */ | 1446 | /* Note if special escape prefix is present, but remove for now. */ |
| 1448 | if (newdir[0] == '/' && newdir[1] == ':') | 1447 | if (newdir[0] == '/' && newdir[1] == ':') |
| @@ -1708,8 +1707,7 @@ See also the function `substitute-in-file-name'. */) | |||
| 1708 | CORRECT_DIR_SEPS (target); | 1707 | CORRECT_DIR_SEPS (target); |
| 1709 | #endif /* DOS_NT */ | 1708 | #endif /* DOS_NT */ |
| 1710 | 1709 | ||
| 1711 | result = make_specified_string (target, -1, o - target, | 1710 | result = make_specified_string (target, -1, o - target, multibyte); |
| 1712 | STRING_MULTIBYTE (name)); | ||
| 1713 | 1711 | ||
| 1714 | /* Again look to see if the file name has special constructs in it | 1712 | /* Again look to see if the file name has special constructs in it |
| 1715 | and perhaps call the corresponding file handler. This is needed | 1713 | and perhaps call the corresponding file handler. This is needed |