Commit a43d577e authored by Leo Liu's avatar Leo Liu
Browse files

* ido.el (ido-read-file-name): Conform to the requirements of

read-file-name. 
(ido-read-directory-name): Conform to the requirements of
read-directory-name.

Fixes: debbugs:11861
parent 653d4f43
2013-07-11 Leo Liu <sdl.web@gmail.com>
* ido.el (ido-read-file-name): Conform to the requirements of
read-file-name. (Bug#11861)
(ido-read-directory-name): Conform to the requirements of
read-directory-name.
2013-07-11 Juanma Barranquero <lekktu@gmail.com> 2013-07-11 Juanma Barranquero <lekktu@gmail.com>
* subr.el (delay-warning): New function. * subr.el (delay-warning): New function.
......
...@@ -4780,7 +4780,14 @@ See `read-file-name' for additional parameters." ...@@ -4780,7 +4780,14 @@ See `read-file-name' for additional parameters."
(ido-find-literal nil)) (ido-find-literal nil))
(setq ido-exit nil) (setq ido-exit nil)
(setq filename (setq filename
(ido-read-internal 'file prompt 'ido-file-history default-filename mustmatch initial)) (ido-read-internal 'file prompt 'ido-file-history
(cond ; Bug#11861.
((stringp default-filename) default-filename)
((consp default-filename) (car default-filename))
((and (not default-filename) initial)
(expand-file-name initial dir))
(buffer-file-name buffer-file-name))
mustmatch initial))
(setq dir ido-current-directory) ; See bug#1516. (setq dir ido-current-directory) ; See bug#1516.
(cond (cond
((eq ido-exit 'fallback) ((eq ido-exit 'fallback)
...@@ -4813,8 +4820,13 @@ See `read-directory-name' for additional parameters." ...@@ -4813,8 +4820,13 @@ See `read-directory-name' for additional parameters."
(ido-directory-too-big-p ido-current-directory))) (ido-directory-too-big-p ido-current-directory)))
(ido-work-directory-index -1) (ido-work-directory-index -1)
(ido-work-file-index -1)) (ido-work-file-index -1))
(setq filename (setq filename (ido-read-internal
(ido-read-internal 'dir prompt 'ido-file-history default-dirname mustmatch initial)) 'dir prompt 'ido-file-history
(or default-dirname ; Bug#11861.
(if initial
(expand-file-name initial ido-current-directory)
ido-current-directory))
mustmatch initial))
(cond (cond
((eq ido-exit 'fallback) ((eq ido-exit 'fallback)
(let ((read-file-name-function nil)) (let ((read-file-name-function nil))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment