1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-23 10:34:07 +00:00

* 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
This commit is contained in:
Leo Liu 2013-07-11 10:59:54 +08:00
parent 653d4f43a7
commit a43d577e48
2 changed files with 22 additions and 3 deletions

View File

@ -1,3 +1,10 @@
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>
* subr.el (delay-warning): New function.

View File

@ -4780,7 +4780,14 @@ See `read-file-name' for additional parameters."
(ido-find-literal nil))
(setq ido-exit nil)
(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.
(cond
((eq ido-exit 'fallback)
@ -4813,8 +4820,13 @@ See `read-directory-name' for additional parameters."
(ido-directory-too-big-p ido-current-directory)))
(ido-work-directory-index -1)
(ido-work-file-index -1))
(setq filename
(ido-read-internal 'dir prompt 'ido-file-history default-dirname mustmatch initial))
(setq filename (ido-read-internal
'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
((eq ido-exit 'fallback)
(let ((read-file-name-function nil))