+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):
(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))