diff options
| author | Eli Zaretskii | 2008-03-29 13:53:02 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2008-03-29 13:53:02 +0000 |
| commit | 6d5577783e2e909808280438eae1c2d6293fdf34 (patch) | |
| tree | 90c1ac61aacb65512f684c70e931872cc89e1542 /src | |
| parent | 115c0061772238c4118c271903336405d35416e7 (diff) | |
| download | emacs-6d5577783e2e909808280438eae1c2d6293fdf34.tar.gz emacs-6d5577783e2e909808280438eae1c2d6293fdf34.zip | |
(Fexpand_file_name): Convert the value of $HOME to a multibyte string.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/fileio.c | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 33c1b324e97..c7f52c3dd6a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2008-03-29 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * fileio.c (Fexpand_file_name): Convert the value of $HOME to a | ||
| 4 | multibyte string. | ||
| 5 | |||
| 1 | 2008-03-29 Stefan Monnier <monnier@iro.umontreal.ca> | 6 | 2008-03-29 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 7 | ||
| 3 | * keyboard.c (pending_funcalls): New var. | 8 | * keyboard.c (pending_funcalls): New var. |
diff --git a/src/fileio.c b/src/fileio.c index fe05cf9d441..2af8124a850 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -1378,9 +1378,15 @@ See also the function `substitute-in-file-name'. */) | |||
| 1378 | #endif /* VMS */ | 1378 | #endif /* VMS */ |
| 1379 | || nm[1] == 0) /* ~ by itself */ | 1379 | || nm[1] == 0) /* ~ by itself */ |
| 1380 | { | 1380 | { |
| 1381 | Lisp_Object tem; | ||
| 1382 | |||
| 1381 | if (!(newdir = (unsigned char *) egetenv ("HOME"))) | 1383 | if (!(newdir = (unsigned char *) egetenv ("HOME"))) |
| 1382 | newdir = (unsigned char *) ""; | 1384 | newdir = (unsigned char *) ""; |
| 1383 | nm++; | 1385 | nm++; |
| 1386 | /* egetenv may return a unibyte string, which will bite us since | ||
| 1387 | we expect the directory to be multibyte. */ | ||
| 1388 | tem = string_to_multibyte (build_string (newdir)); | ||
| 1389 | newdir = SDATA (tem); | ||
| 1384 | #ifdef DOS_NT | 1390 | #ifdef DOS_NT |
| 1385 | collapse_newdir = 0; | 1391 | collapse_newdir = 0; |
| 1386 | #endif | 1392 | #endif |