emacs-devel
[Top][All Lists]
Advanced

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

Re: address@hidden: change to try-completion behavior]


From: Chong Yidong
Subject: Re: address@hidden: change to try-completion behavior]
Date: Mon, 05 Mar 2007 22:22:50 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.95 (gnu/linux)

> There was an old thread in gnu.emacs.help (see below) about the change
> in behavior of try-completion in CVS.
>
> This code
>
>   (let ((completion-ignore-case t))
>        (try-completion "w" '(("W") ("Write") ("w"))))
>
> returns "W" in Emacs 22. In Emacs 21 is used to return "w", that is
> the best match _including_ case.
>
> I should have said in that discussion that I think that this is a
> bug/regression. Ftry_completion contains this comment:
>
>   /* If there is more than one exact match ignoring case, and one of
>      them is exact including case, prefer that one. */
>
> The new short-circuiting behavior means that this note is not true in
> general.
>
> http://article.gmane.org/gmane.emacs.help/32010

The thread you cited suggested the following patch.  Does it work
satisfactorily?

*** emacs/src/minibuf.c.~1.326.~        2007-02-23 11:24:42.000000000 -0500
--- emacs/src/minibuf.c 2007-03-05 22:20:35.000000000 -0500
***************
*** 1483,1488 ****
--- 1483,1489 ----
                matchcount++;
              bestmatchsize = matchsize;
              if (matchsize <= SCHARS (string)
+                 && !completion_ignore_case
                  && matchcount > 1)
                /* No need to look any further.  */
                break;




reply via email to

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