From 8eb17675b964e0d3d22b595e3c236a654bfe053a Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Wed, 20 Jun 2007 15:14:44 +0000 Subject: [PATCH] (ido-find-file-in-dir): Use `file-name-as-directory'. --- lisp/ChangeLog | 3 +++ lisp/ido.el | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) 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 -- 2.39.2