changeset 76525:9d80f63e45cf

2007-03-17 Richard Stallman <rms@gnu.org> (file_name_completion): Gcpro NAME.
author Kim F. Storm <storm@cua.dk>
date Sat, 17 Mar 2007 23:44:57 +0000
parents c85a2d7beebf
children 89c077825908
files src/dired.c
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/dired.c	Sat Mar 17 23:44:01 2007 +0000
+++ b/src/dired.c	Sat Mar 17 23:44:57 2007 +0000
@@ -670,8 +670,15 @@
 	  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 @@
 	      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)