diff options
author | Karoly Lorentey <lorentey@elte.hu> | 2004-05-07 14:20:00 +0000 |
---|---|---|
committer | Karoly Lorentey <lorentey@elte.hu> | 2004-05-07 14:20:00 +0000 |
commit | 52f9ab73a16c71ffe7f8a1c25f9432bbe32f10cf (patch) | |
tree | 399c54ddfa7cac6c90a07a81308bf7f5e71b66bd /lisp/ido.el | |
parent | b160ff41a813213adfa745a9d009ab638a22d7b1 (diff) | |
parent | a478f3e181bd9925ecb506abf4e49216d392124a (diff) | |
download | emacs-52f9ab73a16c71ffe7f8a1c25f9432bbe32f10cf.tar.gz emacs-52f9ab73a16c71ffe7f8a1c25f9432bbe32f10cf.tar.bz2 emacs-52f9ab73a16c71ffe7f8a1c25f9432bbe32f10cf.zip |
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-268
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-269
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-270
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-271
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-272
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-273
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-274
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-275
Update from CVS: man/makefile.w32-in: Revert last change
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-276
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-277
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-278
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-279
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-280
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-281
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-282
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-283
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-284
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-285
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-286
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-157
Diffstat (limited to 'lisp/ido.el')
-rw-r--r-- | lisp/ido.el | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/lisp/ido.el b/lisp/ido.el index 6a66ce0388d..4cbc88cf037 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -1,6 +1,6 @@ ;;; ido.el --- interactively do things with buffers and files. -;; Copyright (C) 1996-2003 Free Software Foundation, Inc. +;; Copyright (C) 1996-2004 Free Software Foundation, Inc. ;; Author: Kim F. Storm <storm@cua.dk> ;; Based on: iswitchb by Stephen Eglen <stephen@cns.ed.ac.uk> @@ -30,8 +30,9 @@ ;; for ido-switch-buffer and found the inspiration for ido-find-file. ;; The ido package would never have existed without his work. -;; Also thanks to Klaus Berndl, Rohit Namjoshi, Robert Fenk, Alex Schroeder, -;; Bill Benedetto, and Stephen Eglen for bug fixes and improvements. +;; Also thanks to Klaus Berndl, Rohit Namjoshi, Robert Fenk, Alex +;; Schroeder, Bill Benedetto, Stephen Eglen, and many others for bug +;; fixes and improvements. ;;; History @@ -55,7 +56,7 @@ ;; so I invented a common "ido-" namespace for the merged packages. ;; ;; This version is based on ido.el version 1.57 released on -;; gnu.emacs.sources adapted for emacs 21.4 to use command remapping +;; gnu.emacs.sources adapted for emacs 21.5 to use command remapping ;; and optionally hooking the read-buffer and read-file-name functions. ;; ;; Prefix matching was added by Klaus Berndl <klaus.berndl@sdm.de> based on @@ -1667,8 +1668,7 @@ If INITIAL is non-nil, it specifies the initial input string." ((memq ido-exit '(edit chdir)) (cond ((memq ido-cur-item '(file dir)) - (let* ((process-environment (cons "HOME=/" process-environment)) ;; cheat read-file-name - (read-file-name-function nil) + (let* ((read-file-name-function nil) (edit (eq ido-exit 'edit)) (d ido-current-directory) (f ido-text-init) @@ -1676,7 +1676,9 @@ If INITIAL is non-nil, it specifies the initial input string." (setq ido-text-init "") (while new (setq new (if edit - (read-file-name (concat prompt "[EDIT] ") d (concat d f) nil f) + (read-file-name (concat prompt "[EDIT] ") + (expand-file-name d) + (concat d f) nil f) f) d (or (file-name-directory new) "/") f (file-name-nondirectory new) @@ -3807,15 +3809,19 @@ For details of keybindings, do `\\[describe-function] ido-find-file'." ;;; Helper functions for other programs +(put 'dired-do-rename 'ido 'ignore) + ;;;###autoload (defun ido-read-file-name (prompt &optional dir default-filename mustmatch initial predicate) "Read file name, prompting with PROMPT and completing in directory DIR. See `read-file-name' for additional parameters." (cond ((or (eq predicate 'file-directory-p) + (eq (get this-command 'ido) 'dir) (memq this-command ido-read-file-name-as-directory-commands)) (ido-read-directory-name prompt dir default-filename mustmatch initial)) - ((and (not (memq this-command ido-read-file-name-non-ido)) + ((and (not (eq (get this-command 'ido) 'ignore)) + (not (memq this-command ido-read-file-name-non-ido)) (or (null predicate) (eq predicate 'file-exists-p))) (let* (filename ido-saved-vc-hb |