aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim F. Storm2004-04-10 21:41:06 +0000
committerKim F. Storm2004-04-10 21:41:06 +0000
commitd81aa76a117f4ded2f1094cf249cd3ccc06ec6d9 (patch)
tree0d46c0dc6aadb9b648d16e0f77eb96047bbd48fd
parent539859c33d0b925448c5ddcd3d252064a782b1a1 (diff)
downloademacs-d81aa76a117f4ded2f1094cf249cd3ccc06ec6d9.tar.gz
emacs-d81aa76a117f4ded2f1094cf249cd3ccc06ec6d9.zip
(ido-confirm-unique-completion): New defcustom.
(ido-complete): Use it. (ido-write-file): Set it to t unconditionally.
-rw-r--r--lisp/ido.el18
1 files changed, 15 insertions, 3 deletions
diff --git a/lisp/ido.el b/lisp/ido.el
index 4593c55dff7..6a66ce0388d 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -489,6 +489,13 @@ Value can be toggled within `ido' using `ido-toggle-prefix'."
489 :type 'boolean 489 :type 'boolean
490 :group 'ido) 490 :group 'ido)
491 491
492(defcustom ido-confirm-unique-completion nil
493 "*Non-nil means that even a unique completion must be confirmed.
494This means that \\[ido-complete] must always be followed by \\[ido-exit-minibuffer]
495even when there is only one unique completion."
496 :type 'boolean
497 :group 'ido)
498
492(defcustom ido-cannot-complete-command 'ido-completion-help 499(defcustom ido-cannot-complete-command 'ido-completion-help
493 "*Command run when `ido-complete' can't complete any more. 500 "*Command run when `ido-complete' can't complete any more.
494The most useful values are `ido-completion-help', which pops up a 501The most useful values are `ido-completion-help', which pops up a
@@ -1899,7 +1906,7 @@ If INITIAL is non-nil, it specifies the initial input string."
1899 1906
1900 ((and ido-use-filename-at-point 1907 ((and ido-use-filename-at-point
1901 (setq fn (ffap-string-at-point)) 1908 (setq fn (ffap-string-at-point))
1902 (not (string-match "^http:/" fn)) 1909 (not (string-match "^http:/" fn))
1903 (setq d (file-name-directory fn)) 1910 (setq d (file-name-directory fn))
1904 (file-directory-p d)) 1911 (file-directory-p d))
1905 (setq ido-current-directory d) 1912 (setq ido-current-directory d)
@@ -2056,7 +2063,11 @@ If INITIAL is non-nil, it specifies the initial input string."
2056 (string-equal ido-current-directory "/") 2063 (string-equal ido-current-directory "/")
2057 (string-match "..[@:]\\'" (car ido-matches))))) 2064 (string-match "..[@:]\\'" (car ido-matches)))))
2058 ;; only one choice, so select it. 2065 ;; only one choice, so select it.
2059 (exit-minibuffer)) 2066 (if (not ido-confirm-unique-completion)
2067 (exit-minibuffer)
2068 (setq ido-rescan (not ido-enable-prefix))
2069 (delete-region (minibuffer-prompt-end) (point))
2070 (insert (car ido-matches))))
2060 2071
2061 (t ;; else there could be some completions 2072 (t ;; else there could be some completions
2062 (setq res ido-common-match-string) 2073 (setq res ido-common-match-string)
@@ -3396,6 +3407,7 @@ For details of keybindings, do `\\[describe-function] ido-find-file'."
3396 (ido-work-directory-match-only nil) 3407 (ido-work-directory-match-only nil)
3397 (ido-ignore-files (cons "[^/]\\'" ido-ignore-files)) 3408 (ido-ignore-files (cons "[^/]\\'" ido-ignore-files))
3398 (ido-report-no-match nil) 3409 (ido-report-no-match nil)
3410 (ido-confirm-unique-completion t)
3399 (ido-auto-merge-work-directories-length -1)) 3411 (ido-auto-merge-work-directories-length -1))
3400 (ido-file-internal 'write 'write-file nil "Write file: "))) 3412 (ido-file-internal 'write 'write-file nil "Write file: ")))
3401 3413
@@ -3544,7 +3556,7 @@ For details of keybindings, do `\\[describe-function] ido-find-file'."
3544 (setq refresh t)) 3556 (setq refresh t))
3545 ((and ido-directory-nonreadable 3557 ((and ido-directory-nonreadable
3546 (file-directory-p (concat ido-current-directory (file-name-directory contents)))) 3558 (file-directory-p (concat ido-current-directory (file-name-directory contents))))
3547 (ido-set-current-directory 3559 (ido-set-current-directory
3548 (concat ido-current-directory (file-name-directory contents))) 3560 (concat ido-current-directory (file-name-directory contents)))
3549 (setq refresh t)) 3561 (setq refresh t))
3550 (t 3562 (t