emacs-bug-tracker
[Top][All Lists]
Advanced

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

[Emacs-bug-tracker] bug#7238: closed (24.0.50; find-library gives wrong


From: GNU bug Tracking System
Subject: [Emacs-bug-tracker] bug#7238: closed (24.0.50; find-library gives wrong library - REGRESSION)
Date: Mon, 18 Oct 2010 21:20:03 +0000

Your message dated Mon, 18 Oct 2010 17:02:29 -0400
with message-id <address@hidden>
and subject line Re: bug#7238: 24.0.50; find-library gives wrong library - 
REGRESSION
has caused the GNU bug report #7238,
regarding 24.0.50; find-library gives wrong library - REGRESSION
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
7238: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7238
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.0.50; find-library gives wrong library - REGRESSION Date: Mon, 18 Oct 2010 09:55:16 -0700
emacs -Q
 
M-x find-library dired. TAB
 
TAB completes to dired.elc. It should, by priority, complete to
dired.el, as it used to do (Emacs 22, 23 etc.).

In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2010-09-20 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4) --no-opt --cflags
-Ic:/imagesupport/include'
 




--- End Message ---
--- Begin Message --- Subject: Re: bug#7238: 24.0.50; find-library gives wrong library - REGRESSION Date: Mon, 18 Oct 2010 17:02:29 -0400 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
> emacs -Q
> M-x find-library dired. TAB
 
> TAB completes to dired.elc. It should, by priority, complete to
> dired.el, as it used to do (Emacs 22, 23 etc.).

Indeed.  The behavior of M-x find-library RET dired TAB is odd, but the
one for dired. TAB is really a bug, which I fixed with the patch below.
Thanks,


        Stefan


=== modified file 'lisp/files.el'
--- lisp/files.el       2010-10-02 13:21:43 +0000
+++ lisp/files.el       2010-10-18 20:51:50 +0000
@@ -801,9 +801,10 @@
       ;; Switching from names to names+fullnames creates a non-monotonicity
       ;; which can cause problems with things like partial-completion.
       ;; To minimize the problem, filter out completion-regexp-list, so that
-      ;; M-x load-library RET t/x.e TAB finds some files.
-      (if completion-regexp-list
-          (setq names (all-completions "" names)))
+      ;; M-x load-library RET t/x.e TAB finds some files.  Also remove elements
+      ;; from `names' which only matched `string' when they still had
+      ;; their suffix.
+      (setq names (all-completions string names))
       ;; Remove duplicates of the first element, so that we can easily check
       ;; if `names' really only contains a single element.
       (when (cdr names) (setcdr names (delete (car names) (cdr names))))



--- End Message ---

reply via email to

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