diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/dired.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/dired.c b/src/dired.c index 8ff38647946..2b2b5dcdf61 100644 --- a/src/dired.c +++ b/src/dired.c | |||
| @@ -286,6 +286,8 @@ file_name_completion (file, dirname, all_flag, ver_flag) | |||
| 286 | int directoryp; | 286 | int directoryp; |
| 287 | int passcount; | 287 | int passcount; |
| 288 | int count = specpdl_ptr - specpdl; | 288 | int count = specpdl_ptr - specpdl; |
| 289 | struct gcpro gcpro1, gcpro2, gcpro3; | ||
| 290 | |||
| 289 | #ifdef VMS | 291 | #ifdef VMS |
| 290 | extern DIRENTRY * readdirver (); | 292 | extern DIRENTRY * readdirver (); |
| 291 | 293 | ||
| @@ -305,8 +307,10 @@ file_name_completion (file, dirname, all_flag, ver_flag) | |||
| 305 | #ifdef FILE_SYSTEM_CASE | 307 | #ifdef FILE_SYSTEM_CASE |
| 306 | file = FILE_SYSTEM_CASE (file); | 308 | file = FILE_SYSTEM_CASE (file); |
| 307 | #endif | 309 | #endif |
| 308 | dirname = Fexpand_file_name (dirname, Qnil); | ||
| 309 | bestmatch = Qnil; | 310 | bestmatch = Qnil; |
| 311 | dirname = Qnil; | ||
| 312 | GCPRO3 (file, dirname, bestmatch); | ||
| 313 | dirname = Fexpand_file_name (dirname, Qnil); | ||
| 310 | 314 | ||
| 311 | /* With passcount = 0, ignore files that end in an ignored extension. | 315 | /* With passcount = 0, ignore files that end in an ignored extension. |
| 312 | If nothing found then try again with passcount = 1, don't ignore them. | 316 | If nothing found then try again with passcount = 1, don't ignore them. |
| @@ -451,7 +455,8 @@ file_name_completion (file, dirname, all_flag, ver_flag) | |||
| 451 | closedir (d); | 455 | closedir (d); |
| 452 | } | 456 | } |
| 453 | 457 | ||
| 454 | unbind_to (count, Qnil); | 458 | UNGCPRO; |
| 459 | bestmatch = unbind_to (count, bestmatch); | ||
| 455 | 460 | ||
| 456 | if (all_flag || NILP (bestmatch)) | 461 | if (all_flag || NILP (bestmatch)) |
| 457 | return bestmatch; | 462 | return bestmatch; |