Mercurial > emacs
comparison lisp/ido.el @ 55359:fa5273a32653
(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.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Tue, 04 May 2004 13:05:19 +0000 |
parents | ae50ef10fab5 |
children | c1239eb451dc |
comparison
equal
deleted
inserted
replaced
55358:661d7ab25c0e | 55359:fa5273a32653 |
---|---|
1665 ido-exit nil)) | 1665 ido-exit nil)) |
1666 | 1666 |
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) |
1675 (new t)) | 1674 (new t)) |
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) |
1683 edit t) | 1684 edit t) |
1684 (if (or | 1685 (if (or |