diff options
| author | Richard M. Stallman | 2004-05-22 22:17:17 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2004-05-22 22:17:17 +0000 |
| commit | abd5b7f2f035085b56f31baa02796701c53d0401 (patch) | |
| tree | 7d62f5c85c3eb2c2566240348aa4062b6646cd10 /src | |
| parent | 017e09acc2ba852fdbad4d601d715362c81a372a (diff) | |
| download | emacs-abd5b7f2f035085b56f31baa02796701c53d0401.tar.gz emacs-abd5b7f2f035085b56f31baa02796701c53d0401.zip | |
(Fread_file_name): Expand DIR if not absolute.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fileio.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/fileio.c b/src/fileio.c index 8696946eb8a..5c073433c75 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -6198,10 +6198,13 @@ provides a file dialog box. */) | |||
| 6198 | 6198 | ||
| 6199 | if (NILP (dir)) | 6199 | if (NILP (dir)) |
| 6200 | dir = current_buffer->directory; | 6200 | dir = current_buffer->directory; |
| 6201 | if (NILP (Ffile_name_absolute_p (dir))) | ||
| 6202 | dir = Fexpand_file_name (dir, Qnil); | ||
| 6201 | if (NILP (default_filename)) | 6203 | if (NILP (default_filename)) |
| 6202 | default_filename = !NILP (initial) | 6204 | default_filename |
| 6203 | ? Fexpand_file_name (initial, dir) | 6205 | = (!NILP (initial) |
| 6204 | : current_buffer->filename; | 6206 | ? Fexpand_file_name (initial, dir) |
| 6207 | : current_buffer->filename); | ||
| 6205 | 6208 | ||
| 6206 | /* If dir starts with user's homedir, change that to ~. */ | 6209 | /* If dir starts with user's homedir, change that to ~. */ |
| 6207 | homedir = (char *) egetenv ("HOME"); | 6210 | homedir = (char *) egetenv ("HOME"); |