Mercurial > emacs
diff lisp/minibuffer.el @ 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 | 81b6ecd7be01 |
children | 3530bf3c1687 |
line wrap: on
line diff
--- 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))