diff options
| author | Leo Liu | 2013-07-11 10:59:54 +0800 |
|---|---|---|
| committer | Leo Liu | 2013-07-11 10:59:54 +0800 |
| commit | a43d577e485424c5352fe551e34fa35ea2724124 (patch) | |
| tree | 92ee10368c573672f34727ab5fc180a5046f344b | |
| parent | 653d4f43a7280d8fb84173be37b0c4c518cf7a88 (diff) | |
| download | emacs-a43d577e485424c5352fe551e34fa35ea2724124.tar.gz emacs-a43d577e485424c5352fe551e34fa35ea2724124.zip | |
* 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
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/ido.el | 18 |
2 files changed, 22 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 37421981f7f..4b9cbe829f3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2013-07-11 Leo Liu <sdl.web@gmail.com> | ||
| 2 | |||
| 3 | * ido.el (ido-read-file-name): Conform to the requirements of | ||
| 4 | read-file-name. (Bug#11861) | ||
| 5 | (ido-read-directory-name): Conform to the requirements of | ||
| 6 | read-directory-name. | ||
| 7 | |||
| 1 | 2013-07-11 Juanma Barranquero <lekktu@gmail.com> | 8 | 2013-07-11 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 9 | ||
| 3 | * subr.el (delay-warning): New function. | 10 | * subr.el (delay-warning): New function. |
diff --git a/lisp/ido.el b/lisp/ido.el index 22c8a4e65be..b32c1d00bc2 100644 --- a/lisp/ido.el +++ b/lisp/ido.el | |||
| @@ -4780,7 +4780,14 @@ See `read-file-name' for additional parameters." | |||
| 4780 | (ido-find-literal nil)) | 4780 | (ido-find-literal nil)) |
| 4781 | (setq ido-exit nil) | 4781 | (setq ido-exit nil) |
| 4782 | (setq filename | 4782 | (setq filename |
| 4783 | (ido-read-internal 'file prompt 'ido-file-history default-filename mustmatch initial)) | 4783 | (ido-read-internal 'file prompt 'ido-file-history |
| 4784 | (cond ; Bug#11861. | ||
| 4785 | ((stringp default-filename) default-filename) | ||
| 4786 | ((consp default-filename) (car default-filename)) | ||
| 4787 | ((and (not default-filename) initial) | ||
| 4788 | (expand-file-name initial dir)) | ||
| 4789 | (buffer-file-name buffer-file-name)) | ||
| 4790 | mustmatch initial)) | ||
| 4784 | (setq dir ido-current-directory) ; See bug#1516. | 4791 | (setq dir ido-current-directory) ; See bug#1516. |
| 4785 | (cond | 4792 | (cond |
| 4786 | ((eq ido-exit 'fallback) | 4793 | ((eq ido-exit 'fallback) |
| @@ -4813,8 +4820,13 @@ See `read-directory-name' for additional parameters." | |||
| 4813 | (ido-directory-too-big-p ido-current-directory))) | 4820 | (ido-directory-too-big-p ido-current-directory))) |
| 4814 | (ido-work-directory-index -1) | 4821 | (ido-work-directory-index -1) |
| 4815 | (ido-work-file-index -1)) | 4822 | (ido-work-file-index -1)) |
| 4816 | (setq filename | 4823 | (setq filename (ido-read-internal |
| 4817 | (ido-read-internal 'dir prompt 'ido-file-history default-dirname mustmatch initial)) | 4824 | 'dir prompt 'ido-file-history |
| 4825 | (or default-dirname ; Bug#11861. | ||
| 4826 | (if initial | ||
| 4827 | (expand-file-name initial ido-current-directory) | ||
| 4828 | ido-current-directory)) | ||
| 4829 | mustmatch initial)) | ||
| 4818 | (cond | 4830 | (cond |
| 4819 | ((eq ido-exit 'fallback) | 4831 | ((eq ido-exit 'fallback) |
| 4820 | (let ((read-file-name-function nil)) | 4832 | (let ((read-file-name-function nil)) |