From 6a02191778c3bf436e8a8806c052014b4b5a9539 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sat, 19 Apr 2008 04:01:16 +0000 Subject: [PATCH] * finder.el (finder-commentary): * subr.el (locate-library): Use locate-file-completion-table. --- lisp/ChangeLog | 3 +++ lisp/finder.el | 6 +++--- lisp/subr.el | 5 +++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9c8e8ccc16b..dace8b927ba 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,9 +1,12 @@ 2008-04-19 Stefan Monnier + * files.el (locate-file-completion-table): Rename from locate-file-completion and make it use `pred' in the normal way. (locate-file-completion): New compatibility wrapper. (load-library): Use locate-file-completion-table. + * finder.el (finder-commentary): + * subr.el (locate-library): * emacs-lisp/find-func.el (find-library): Likewise. * info.el: Use with-current-buffer and inhibit-read-only. (Info-read-node-name-2): Change to use `predicate' in the normal way. diff --git a/lisp/finder.el b/lisp/finder.el index e5a41ca7e46..667b2401d14 100644 --- a/lisp/finder.el +++ b/lisp/finder.el @@ -287,9 +287,9 @@ FILE should be in a form suitable for passing to `locate-library'." (interactive (list (completing-read "Library name: " - 'locate-file-completion - (cons (or find-function-source-path load-path) - (find-library-suffixes))))) + (apply-partially 'locate-file-completion-table + (or find-function-source-path load-path) + (find-library-suffixes))))) (let* ((str (lm-commentary (find-library-name file)))) (if (null str) (error "Can't find any Commentary section")) diff --git a/lisp/subr.el b/lisp/subr.el index d81dfae4575..1f6d5580bff 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1487,8 +1487,9 @@ When called from a program, the file name is normaly returned as a string. When run interactively, the argument INTERACTIVE-CALL is t, and the file name is displayed in the echo area." (interactive (list (completing-read "Locate library: " - 'locate-file-completion - (cons load-path (get-load-suffixes))) + (apply-partially + 'locate-file-completion-table + load-path (get-load-suffixes))) nil nil t)) (let ((file (locate-file library -- 2.39.5