diff options
| author | Stefan Monnier | 2008-02-06 03:16:10 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2008-02-06 03:16:10 +0000 |
| commit | ca3199106fe185dd5d42e5086a7e5c4f7ea10659 (patch) | |
| tree | efb194ceb0a413d37973cfdebd24ab574c1d0d3c /src | |
| parent | f9ffa1eabb499f073b72015041ac2ed1d10f34e7 (diff) | |
| download | emacs-ca3199106fe185dd5d42e5086a7e5c4f7ea10659.tar.gz emacs-ca3199106fe185dd5d42e5086a7e5c4f7ea10659.zip | |
* process.c (Fstart_process):
* callproc.c (Fcall_process): Handle the case where
Funhandled_file_name_directory returns nil.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/callproc.c | 9 | ||||
| -rw-r--r-- | src/fileio.c | 2 | ||||
| -rw-r--r-- | src/process.c | 9 |
4 files changed, 18 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 88ed0a7f4c9..b06d4d45525 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2008-02-06 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2008-02-06 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * process.c (Fstart_process): | ||
| 4 | * callproc.c (Fcall_process): Handle the case where | ||
| 5 | Funhandled_file_name_directory returns nil. | ||
| 6 | |||
| 3 | * font.h (enum lgstring_indices, enum lglyph_indices): New enums. | 7 | * font.h (enum lgstring_indices, enum lglyph_indices): New enums. |
| 4 | (LGSTRING_SLOT, LGSTRING_SET_SLOT): New macros. | 8 | (LGSTRING_SLOT, LGSTRING_SET_SLOT): New macros. |
| 5 | * font.c (check_gstring): Use them and AREF to access the vector before | 9 | * font.c (check_gstring): Use them and AREF to access the vector before |
diff --git a/src/callproc.c b/src/callproc.c index a3b7b7afa4a..fdd1ee7988c 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -376,9 +376,12 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 376 | 376 | ||
| 377 | GCPRO4 (infile, buffer, current_dir, error_file); | 377 | GCPRO4 (infile, buffer, current_dir, error_file); |
| 378 | 378 | ||
| 379 | current_dir | 379 | current_dir = Funhandled_file_name_directory (current_dir); |
| 380 | = expand_and_dir_to_file (Funhandled_file_name_directory (current_dir), | 380 | if (NILP (current_dir)) |
| 381 | Qnil); | 381 | /* If the file name handler says that current_dir is unreachable, use |
| 382 | a sensible default. */ | ||
| 383 | current_dir = build_string ("~/"); | ||
| 384 | current_dir = expand_and_dir_to_file (current_dir, Qnil); | ||
| 382 | if (NILP (Ffile_accessible_directory_p (current_dir))) | 385 | if (NILP (Ffile_accessible_directory_p (current_dir))) |
| 383 | report_file_error ("Setting current directory", | 386 | report_file_error ("Setting current directory", |
| 384 | Fcons (current_buffer->directory, Qnil)); | 387 | Fcons (current_buffer->directory, Qnil)); |
diff --git a/src/fileio.c b/src/fileio.c index 26020732160..76d076f75b2 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -532,6 +532,8 @@ A `directly usable' directory name is one that may be used without the | |||
| 532 | intervention of any file handler. | 532 | intervention of any file handler. |
| 533 | If FILENAME is a directly usable file itself, return | 533 | If FILENAME is a directly usable file itself, return |
| 534 | \(file-name-directory FILENAME). | 534 | \(file-name-directory FILENAME). |
| 535 | If FILENAME refers to a file which is not accessible from a local process, | ||
| 536 | then this should return nil. | ||
| 535 | The `call-process' and `start-process' functions use this function to | 537 | The `call-process' and `start-process' functions use this function to |
| 536 | get a current directory to run processes in. */) | 538 | get a current directory to run processes in. */) |
| 537 | (filename) | 539 | (filename) |
diff --git a/src/process.c b/src/process.c index e5546488aae..73da0db18a8 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -1614,9 +1614,12 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) | |||
| 1614 | 1614 | ||
| 1615 | GCPRO2 (buffer, current_dir); | 1615 | GCPRO2 (buffer, current_dir); |
| 1616 | 1616 | ||
| 1617 | current_dir | 1617 | current_dir = Funhandled_file_name_directory (current_dir); |
| 1618 | = expand_and_dir_to_file (Funhandled_file_name_directory (current_dir), | 1618 | if (NILP (current_dir)) |
| 1619 | Qnil); | 1619 | /* If the file name handler says that current_dir is unreachable, use |
| 1620 | a sensible default. */ | ||
| 1621 | current_dir = build_string ("~/"); | ||
| 1622 | current_dir = expand_and_dir_to_file (current_dir, Qnil); | ||
| 1620 | if (NILP (Ffile_accessible_directory_p (current_dir))) | 1623 | if (NILP (Ffile_accessible_directory_p (current_dir))) |
| 1621 | report_file_error ("Setting current directory", | 1624 | report_file_error ("Setting current directory", |
| 1622 | Fcons (current_buffer->directory, Qnil)); | 1625 | Fcons (current_buffer->directory, Qnil)); |