* lisp/ido.el (ido-file-internal): Don't add the name of an existing

directory twice.

Fixes: debbugs:16747
This commit is contained in:
Dmitry Gutov 2014-02-16 06:15:47 +02:00
parent 5bcad689ca
commit 17d1b51b65
2 changed files with 13 additions and 8 deletions

View file

@ -1,3 +1,8 @@
2014-02-16 Dmitry Gutov <dgutov@yandex.ru>
* ido.el (ido-file-internal): Don't add the name of an existing
directory twice. (Bug#16747)
2014-02-16 Glenn Morris <rgm@gnu.org>
* vc/ediff-init.el (ediff-use-faces, ediff-highlight-all-diffs):

View file

@ -2375,14 +2375,14 @@ If cursor is not at the end of the user input, move to end of input."
(if (eq ido-use-filename-at-point 'guess)
(ffap-guesser)
(ffap-string-at-point))))
(not (string-match "^http:/" fn))
(let ((absolute-fn (expand-file-name fn)))
(setq d (if (file-directory-p absolute-fn)
(file-name-as-directory absolute-fn)
(file-name-directory absolute-fn))))
(file-directory-p d))
(setq ido-current-directory d)
(setq initial (file-name-nondirectory fn))))))
(not (string-match "^http:/" fn)))
(let ((absolute-fn (expand-file-name fn)))
(cond
((file-directory-p absolute-fn)
(setq ido-current-directory (file-name-as-directory absolute-fn)))
((file-directory-p (file-name-directory absolute-fn))
(setq ido-current-directory (file-name-directory absolute-fn))
(setq initial (file-name-nondirectory absolute-fn)))))))))
(let (ido-saved-vc-hb
(vc-handled-backends (and (boundp 'vc-handled-backends) vc-handled-backends))