* bug#7238: 24.0.50; find-library gives wrong library - REGRESSION
@ 2010-10-18 16:55 Drew Adams
2010-10-18 21:02 ` Stefan Monnier
0 siblings, 1 reply; 2+ messages in thread
From: Drew Adams @ 2010-10-18 16:55 UTC (permalink / raw)
To: 7238
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'
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#7238: 24.0.50; find-library gives wrong library - REGRESSION
2010-10-18 16:55 bug#7238: 24.0.50; find-library gives wrong library - REGRESSION Drew Adams
@ 2010-10-18 21:02 ` Stefan Monnier
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2010-10-18 21:02 UTC (permalink / raw)
To: Drew Adams
> 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))))
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-18 21:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-18 16:55 bug#7238: 24.0.50; find-library gives wrong library - REGRESSION Drew Adams
2010-10-18 21:02 ` Stefan Monnier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.