From: Juanma Barranquero Date: Wed, 20 Jun 2007 15:14:44 +0000 (+0000) Subject: (ido-find-file-in-dir): Use `file-name-as-directory'. X-Git-Tag: emacs-pretest-23.0.90~12196 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8eb17675b964e0d3d22b595e3c236a654bfe053a;p=emacs.git (ido-find-file-in-dir): Use `file-name-as-directory'. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bc63d37234f..02745e8149a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2007-06-20 Juanma Barranquero + * ido.el (ido-find-file-in-dir): Don't signal an error for + empty directories. + * add-log.el (change-log-mode): Set `show-trailing-whitespace'. * desktop.el (desktop-read): Run `desktop-not-loaded-hook' in the diff --git a/lisp/ido.el b/lisp/ido.el index 5a7be3e5ae6..0808075b495 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -3994,8 +3994,7 @@ For details of keybindings, see `ido-switch-buffer'." (defun ido-find-file-in-dir (dir) "Switch to another file starting from DIR." (interactive "DDir: ") - (if (not (equal (substring dir -1) "/")) - (setq dir (concat dir "/"))) + (setq dir (file-name-as-directory dir)) (ido-file-internal ido-default-file-method nil dir nil nil nil 'ignore)) ;;;###autoload