From c4c52bb78af68b4c40685f912113f0bd730f0848 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sat, 17 Mar 2007 23:44:57 +0000 Subject: [PATCH] 2007-03-17 Richard M. Stallman (file_name_completion): Gcpro NAME. --- src/dired.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/dired.c b/src/dired.c index c542f8019db..ee76fe47be2 100644 --- a/src/dired.c +++ b/src/dired.c @@ -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) -- 2.39.5