aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim F. Storm2006-05-17 21:25:59 +0000
committerKim F. Storm2006-05-17 21:25:59 +0000
commit2d38f869f6f2aafd1fc3ddc605d79eda2fa207ae (patch)
tree11b1ad2b0d8bade443eaf386e8785fb51e0480a8
parentfb58b23a98a342a2be9c510fcc33d93e1466b29e (diff)
downloademacs-2d38f869f6f2aafd1fc3ddc605d79eda2fa207ae.tar.gz
emacs-2d38f869f6f2aafd1fc3ddc605d79eda2fa207ae.zip
(ido-read-internal): Use only nondirectory part of default item.
-rw-r--r--lisp/ido.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/ido.el b/lisp/ido.el
index a622a7e6275..d03c002d597 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -1778,7 +1778,7 @@ With ARG, turn ido speed-up on if arg is positive, off otherwise."
1778 "Perform the `ido-read-buffer' and `ido-read-file-name' functions. 1778 "Perform the `ido-read-buffer' and `ido-read-file-name' functions.
1779Return the name of a buffer or file selected. 1779Return the name of a buffer or file selected.
1780PROMPT is the prompt to give to the user. 1780PROMPT is the prompt to give to the user.
1781DEFAULT if given is the default directory to start with. 1781DEFAULT if given is the default item to start with.
1782If REQUIRE-MATCH is non-nil, an existing file must be selected. 1782If REQUIRE-MATCH is non-nil, an existing file must be selected.
1783If INITIAL is non-nil, it specifies the initial input string." 1783If INITIAL is non-nil, it specifies the initial input string."
1784 (let 1784 (let
@@ -1822,7 +1822,10 @@ If INITIAL is non-nil, it specifies the initial input string."
1822 (cond 1822 (cond
1823 ((eq item 'buffer) 1823 ((eq item 'buffer)
1824 (if (bufferp default) (buffer-name default) default)) 1824 (if (bufferp default) (buffer-name default) default))
1825 ((stringp default) default) 1825 ((stringp default)
1826 (if (memq item '(file dir))
1827 (file-name-nondirectory default)
1828 default))
1826 ((eq item 'file) 1829 ((eq item 'file)
1827 (and ido-enable-last-directory-history 1830 (and ido-enable-last-directory-history
1828 (let ((d (assoc ido-current-directory ido-last-directory-list))) 1831 (let ((d (assoc ido-current-directory ido-last-directory-list)))