aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim F. Storm2004-05-04 13:05:19 +0000
committerKim F. Storm2004-05-04 13:05:19 +0000
commit3f2b52ad64f9ea61e9527e8a69bfbee923394c36 (patch)
treebb641b0e1207f3f119a86276e2005f7a202c7fc0
parentbdcc01de44b95099fcd047208226033d3d55954a (diff)
downloademacs-3f2b52ad64f9ea61e9527e8a69bfbee923394c36.tar.gz
emacs-3f2b52ad64f9ea61e9527e8a69bfbee923394c36.zip
(ido-read-internal): Fix call to read-file-name for edit.
Must expand directory for completion to work; and don't mess with process-environment.
-rw-r--r--lisp/ido.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/ido.el b/lisp/ido.el
index 6a66ce0388d..180e9dbb1c8 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -1667,8 +1667,7 @@ If INITIAL is non-nil, it specifies the initial input string."
1667 ((memq ido-exit '(edit chdir)) 1667 ((memq ido-exit '(edit chdir))
1668 (cond 1668 (cond
1669 ((memq ido-cur-item '(file dir)) 1669 ((memq ido-cur-item '(file dir))
1670 (let* ((process-environment (cons "HOME=/" process-environment)) ;; cheat read-file-name 1670 (let* ((read-file-name-function nil)
1671 (read-file-name-function nil)
1672 (edit (eq ido-exit 'edit)) 1671 (edit (eq ido-exit 'edit))
1673 (d ido-current-directory) 1672 (d ido-current-directory)
1674 (f ido-text-init) 1673 (f ido-text-init)
@@ -1676,7 +1675,9 @@ If INITIAL is non-nil, it specifies the initial input string."
1676 (setq ido-text-init "") 1675 (setq ido-text-init "")
1677 (while new 1676 (while new
1678 (setq new (if edit 1677 (setq new (if edit
1679 (read-file-name (concat prompt "[EDIT] ") d (concat d f) nil f) 1678 (read-file-name (concat prompt "[EDIT] ")
1679 (expand-file-name d)
1680 (concat d f) nil f)
1680 f) 1681 f)
1681 d (or (file-name-directory new) "/") 1682 d (or (file-name-directory new) "/")
1682 f (file-name-nondirectory new) 1683 f (file-name-nondirectory new)