diff options
| author | Richard M. Stallman | 1994-03-28 20:55:18 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-03-28 20:55:18 +0000 |
| commit | 3fcc88cce00da5602c389c643b7aa2a569f2e2d0 (patch) | |
| tree | 1ffbf3799576a9ba5bb3901f894ddf97b62ee188 | |
| parent | 73804d4b1beeb0e5510792396018296c672288b2 (diff) | |
| download | emacs-3fcc88cce00da5602c389c643b7aa2a569f2e2d0.tar.gz emacs-3fcc88cce00da5602c389c643b7aa2a569f2e2d0.zip | |
(file_name_completion): Protect things from GC.
| -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; |