emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-23 r99736: * ido.el (ido-file-interna


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-23 r99736: * ido.el (ido-file-internal): Fix 2009-12-02 change.
Date: Wed, 14 Apr 2010 13:32:50 -0400
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 99736
committer: Chong Yidong <address@hidden>
branch nick: emacs-23
timestamp: Wed 2010-04-14 13:32:50 -0400
message:
  * ido.el (ido-file-internal): Fix 2009-12-02 change.
modified:
  lisp/ChangeLog
  lisp/ido.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-04-14 15:33:42 +0000
+++ b/lisp/ChangeLog    2010-04-14 17:32:50 +0000
@@ -1,3 +1,7 @@
+2010-04-14  Óscar Fuentes  <address@hidden>
+
+       * ido.el (ido-file-internal): Fix 2009-12-02 change.
+
 2010-04-14  Christoph  <address@hidden>  (tiny change)
 
        * progmodes/grep.el (grep-compute-defaults): Fix handling of host

=== modified file 'lisp/ido.el'
--- a/lisp/ido.el       2010-01-18 19:34:55 +0000
+++ b/lisp/ido.el       2010-04-14 17:32:50 +0000
@@ -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))))))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]