]> code.delx.au - gnu-emacs/commitdiff
2007-03-17 Richard M. Stallman <rms@gnu.org>
authorKim F. Storm <storm@cua.dk>
Sat, 17 Mar 2007 23:44:57 +0000 (23:44 +0000)
committerKim F. Storm <storm@cua.dk>
Sat, 17 Mar 2007 23:44:57 +0000 (23:44 +0000)
(file_name_completion): Gcpro NAME.

src/dired.c

index c542f8019db1996721234695c0cf555d93c54a94..ee76fe47be2b907a544fde1d2f2974b5d1ddcd1d 100644 (file)
@@ -670,8 +670,15 @@ file_name_completion (file, dirname, all_flag, ver_flag, predicate)
          if (!NILP (predicate))
            {
              Lisp_Object decoded;
+             Lisp_Object val;
+             struct gcpro gcpro1;
+
+             GCPRO1 (name);
              decoded = Fexpand_file_name (DECODE_FILE (name), dirname);
-             if (NILP (call1 (predicate, decoded)))
+             val = call1 (predicate, decoded);
+             UNGCPRO;
+
+             if (NILP (val))
                continue;
            }
 
@@ -694,7 +701,7 @@ file_name_completion (file, dirname, all_flag, ver_flag, predicate)
              compare = min (bestmatchsize, len);
              p1 = SDATA (bestmatch);
              p2 = (unsigned char *) dp->d_name;
-             matchsize = scmp(p1, p2, compare);
+             matchsize = scmp (p1, p2, compare);
              if (matchsize < 0)
                matchsize = compare;
              if (completion_ignore_case)