Mercurial > emacs
changeset 107945:cf183258f1db
* ido.el (ido-file-internal): Fix 2009-12-02 change.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Wed, 14 Apr 2010 13:32:50 -0400 |
parents | f3e910318160 |
children | 0cc12709c3b5 18f276a67de9 |
files | lisp/ChangeLog lisp/ido.el |
diffstat | 2 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Wed Apr 14 11:33:42 2010 -0400 +++ b/lisp/ChangeLog Wed Apr 14 13:32:50 2010 -0400 @@ -1,3 +1,7 @@ +2010-04-14 Óscar Fuentes <ofv@wanadoo.es> + + * ido.el (ido-file-internal): Fix 2009-12-02 change. + 2010-04-14 Christoph <cschol2112@googlemail.com> (tiny change) * progmodes/grep.el (grep-compute-defaults): Fix handling of host
--- a/lisp/ido.el Wed Apr 14 11:33:42 2010 -0400 +++ b/lisp/ido.el Wed Apr 14 13:32:50 2010 -0400 @@ -2272,7 +2272,8 @@ (or ido-use-url-at-point ido-use-filename-at-point)) (let (fn d) (require 'ffap) - ;; Duplicate code from ffap-guesser as we want different behavior for files and URLs. + ;; Duplicate code from ffap-guesser as we want different + ;; behavior for files and URLs. (cond ((with-no-warnings (and ido-use-url-at-point @@ -2288,7 +2289,10 @@ (ffap-guesser) (ffap-string-at-point)))) (not (string-match "^http:/" fn)) - (setq d (file-name-directory (expand-file-name 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))))))