Mercurial > emacs
changeset 94218:701d10a19a8f
(completion--file-name-table): Accept both the old `dir' or the new `pred' arg.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Mon, 21 Apr 2008 21:16:13 +0000 |
parents | 3a71d408918b |
children | 185747659a29 |
files | lisp/ChangeLog lisp/minibuffer.el |
diffstat | 2 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Mon Apr 21 21:01:38 2008 +0000 +++ b/lisp/ChangeLog Mon Apr 21 21:16:13 2008 +0000 @@ -1,5 +1,8 @@ 2008-04-21 Stefan Monnier <monnier@iro.umontreal.ca> + * minibuffer.el (completion--file-name-table): Accept both the old + `dir' arg or the new `pred' arg. + * ffap.el (ffap-read-file-or-url): Do not abuse completing-read's `predicate' argument to pass non-predicate data. (ffap-read-url-internal, ffap-read-file-or-url-internal):
--- a/lisp/minibuffer.el Mon Apr 21 21:01:38 2008 +0000 +++ b/lisp/minibuffer.el Mon Apr 21 21:16:13 2008 +0000 @@ -693,12 +693,16 @@ (substring string beg) pred action)))) -(defun completion--file-name-table (string dir action) +(defun completion--file-name-table (string pred action) "Internal subroutine for `read-file-name'. Do not call this." - (setq dir (expand-file-name dir)) (if (and (zerop (length string)) (eq 'lambda action)) nil ; FIXME: why? - (let* ((str (condition-case nil + (let* ((dir (if (stringp pred) + ;; It used to be that `pred' was abused to pass `dir' + ;; as an argument. + (prog1 (expand-file-name pred) (setq pred nil)) + default-directory)) + (str (condition-case nil (substitute-in-file-name string) (error string))) (name (file-name-nondirectory str))