emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: File name completion with non-ascii filenames


From: Richard Stallman
Subject: Re: File name completion with non-ascii filenames
Date: Tue, 18 Dec 2001 22:59:50 -0700 (MST)

Please try this patch, together with deleting scmp from minibuf.c.
I think it should fix the problem.

*** dired.c.~1.92.~     Tue Nov 13 11:30:24 2001
--- dired.c     Tue Dec 18 17:43:05 2001
***************
*** 117,122 ****
--- 117,124 ----
  Lisp_Object Qfile_name_all_completions;
  Lisp_Object Qfile_attributes;
  Lisp_Object Qfile_attributes_lessp;
+ 
+ static int scmp P_ ((unsigned char *, unsigned char *, int));
  
  
  Lisp_Object
***************
*** 732,737 ****
--- 734,767 ----
    if (d) closedir (d);
    Vquit_flag = Qnil;
    return Fsignal (Qquit, Qnil);
+ }
+ 
+ /* Compare exactly LEN chars of strings at S1 and S2,
+    ignoring case if appropriate.
+    Return -1 if strings match,
+    else number of chars that match at the beginning.  */
+ 
+ static int
+ scmp (s1, s2, len)
+      register unsigned char *s1, *s2;
+      int len;
+ {
+   register int l = len;
+ 
+   if (completion_ignore_case)
+     {
+       while (l && DOWNCASE (*s1++) == DOWNCASE (*s2++))
+       l--;
+     }
+   else
+     {
+       while (l && *s1++ == *s2++)
+       l--;
+     }
+   if (l == 0)
+     return -1;
+   else
+     return len - l;
  }
  
  static int



reply via email to

[Prev in Thread] Current Thread [Next in Thread]