[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/dired.c,v
From: |
Andreas Schwab |
Subject: |
[Emacs-diffs] Changes to emacs/src/dired.c,v |
Date: |
Sun, 27 Apr 2008 18:06:52 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Andreas Schwab <schwab> 08/04/27 18:06:52
Index: dired.c
===================================================================
RCS file: /sources/emacs/emacs/src/dired.c,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -b -r1.141 -r1.142
--- dired.c 26 Apr 2008 08:22:21 -0000 1.141
+++ dired.c 27 Apr 2008 18:06:51 -0000 1.142
@@ -539,6 +539,7 @@
{
DIRENTRY *dp;
int len;
+ Lisp_Object decoded_name;
#ifdef VMS
dp = (*readfunc) (d);
@@ -640,6 +641,9 @@
if (!passcount && CONSP (tem))
continue;
+ name = make_unibyte_string (dp->d_name, len);
+ decoded_name = DECODE_FILE (name);
+
if (!passcount)
{
Lisp_Object regexps;
@@ -650,8 +654,7 @@
for (regexps = Vcompletion_regexp_list; CONSP (regexps);
regexps = XCDR (regexps))
{
- tem = Fstring_match (XCAR (regexps),
- make_string (dp->d_name, len), zero);
+ tem = Fstring_match (XCAR (regexps), decoded_name, zero);
if (NILP (tem))
break;
}
@@ -663,10 +666,8 @@
if (directoryp)
{
/* This completion is a directory; make it end with '/' */
- name = Ffile_name_as_directory (make_string (dp->d_name, len));
+ name = ENCODE_FILE (Ffile_name_as_directory (decoded_name));
}
- else
- name = make_string (dp->d_name, len);
/* Test the predicate, if any. */
@@ -674,10 +675,10 @@
{
Lisp_Object decoded;
Lisp_Object val;
- struct gcpro gcpro1;
+ struct gcpro gcpro1, gcpro2;
- GCPRO1 (name);
- decoded = Fexpand_file_name (DECODE_FILE (name), dirname);
+ GCPRO2 (name, decoded_name);
+ decoded = Fexpand_file_name (decoded_name, dirname);
val = call1 (predicate, decoded);
UNGCPRO;
@@ -690,10 +691,7 @@
matchcount++;
if (all_flag)
- {
- name = DECODE_FILE (name);
- bestmatch = Fcons (name, bestmatch);
- }
+ bestmatch = Fcons (decoded_name, bestmatch);
else if (NILP (bestmatch))
{
bestmatch = name;
@@ -729,8 +727,7 @@
either both or neither are exact. */
(((matchsize == len)
==
- (matchsize + !!directoryp
- == SCHARS (bestmatch)))
+ (matchsize + !!directoryp == SCHARS (bestmatch)))
&& !bcmp (p2, SDATA (encoded_file), SCHARS
(encoded_file))
&& bcmp (p1, SDATA (encoded_file), SCHARS
(encoded_file))))
bestmatch = name;
- [Emacs-diffs] Changes to emacs/src/dired.c,v, Eli Zaretskii, 2008/04/05
- [Emacs-diffs] Changes to emacs/src/dired.c,v, Miles Bader, 2008/04/17
- [Emacs-diffs] Changes to emacs/src/dired.c,v, Stefan Monnier, 2008/04/18
- [Emacs-diffs] Changes to emacs/src/dired.c,v, Eli Zaretskii, 2008/04/26
- [Emacs-diffs] Changes to emacs/src/dired.c,v,
Andreas Schwab <=
- [Emacs-diffs] Changes to emacs/src/dired.c,v, Andreas Schwab, 2008/04/28
- [Emacs-diffs] Changes to emacs/src/dired.c,v, Stefan Monnier, 2008/04/30