Index: dired.c =================================================================== RCS file: /sources/emacs/emacs/src/dired.c,v retrieving revision 1.104.4.17 diff -u -r1.104.4.17 dired.c --- dired.c 26 Jan 2007 06:15:08 -0000 1.104.4.17 +++ dired.c 11 Mar 2007 23:39:11 -0000 @@ -521,6 +521,7 @@ for (passcount = !!all_flag; NILP (bestmatch) && passcount < 2; passcount++) { int inner_count = SPECPDL_INDEX (); + struct gcpro gcpro1; BLOCK_INPUT; d = opendir (SDATA (Fdirectory_file_name (encoded_dir))); @@ -665,6 +666,7 @@ } else name = make_string (dp->d_name, len); + GCPRO1(name); /* Test the predicate, if any. */ @@ -673,7 +675,10 @@ Lisp_Object decoded; decoded = Fexpand_file_name (DECODE_FILE (name), dirname); if (NILP (call1 (predicate, decoded))) - continue; + { + UNGCPRO; + continue; + } } /* Suitably record this match. */ @@ -736,6 +741,7 @@ matchsize++; bestmatchsize = matchsize; } + UNGCPRO; } /* This closes the directory. */ bestmatch = unbind_to (inner_count, bestmatch);