aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim F. Storm2004-09-24 23:48:48 +0000
committerKim F. Storm2004-09-24 23:48:48 +0000
commitcb65c373de1e454248bbb7cc931038f5a7dcbf7e (patch)
treef0e7ce3c02e364ae1ff7947b1ae2de51fb851773
parentffb032e2d3371bebad56ba3603a40916870b9fbe (diff)
downloademacs-cb65c373de1e454248bbb7cc931038f5a7dcbf7e.tar.gz
emacs-cb65c373de1e454248bbb7cc931038f5a7dcbf7e.zip
(ido-max-directory-size): New defcustom.
(ido-decorations): Add "too big" element. (ido-directory-too-big): New dynamic var. (ido-may-cache-directory): Don't cache big directories. (ido-directory-too-big-p): New defun. (ido-set-current-directory): Update ido-directory-too-big. (ido-read-internal): Make empty ido-cur-item if too-big. (ido-buffer-internal): Use ido-read-internal directly instead of ido-read-buffer. (ido-file-internal): Init ido-directory-too-big. (ido-complete): <TAB> If ido-directory-too-big is set, clear it, and redo completion with full list. (ido-toggle-ignore): <C-a> If ido-directory-too-big is set, clear it, and show completions. (ido-all-completions): Let bind ido-directory-too-big to nil. (ido-exhibit): Handle ido-directory-too-big. (ido-read-buffer): Handle fallback to read-buffer. Init ido-directory-too-big. (ido-read-file-name, ido-read-directory-name, ido-completing-read): Init ido-directory-too-big.
-rw-r--r--lisp/ido.el118
1 files changed, 91 insertions, 27 deletions
diff --git a/lisp/ido.el b/lisp/ido.el
index 7f149af1e87..f9066544e1f 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -666,6 +666,14 @@ See also `ido-dir-file-cache' and `ido-save-directory-list-file'."
666 :type 'integer 666 :type 'integer
667 :group 'ido) 667 :group 'ido)
668 668
669(defcustom ido-max-directory-size 30000
670 "*Maximum size (in bytes) for directories to use ido completion.
671If you enter a directory with a size larger than this size, ido will
672not provide the normal completion. To show the completions, use C-a."
673 :type '(choice (const :tag "No limit" nil)
674 (integer :tag "Size in bytes" 30000))
675 :group 'ido)
676
669(defcustom ido-rotate-file-list-default nil 677(defcustom ido-rotate-file-list-default nil
670 "*Non-nil means that `ido' will always rotate file list to get default in front." 678 "*Non-nil means that `ido' will always rotate file list to get default in front."
671 :type 'boolean 679 :type 'boolean
@@ -699,9 +707,9 @@ Obsolete. Set 3rd element of `ido-decorations' instead."
699 :type '(choice string (const nil)) 707 :type '(choice string (const nil))
700 :group 'ido) 708 :group 'ido)
701 709
702(defcustom ido-decorations '( "{" "}" " | " " | ..." "[" "]" " [No match]" " [Matched]" " [Not readable]") 710(defcustom ido-decorations '( "{" "}" " | " " | ..." "[" "]" " [No match]" " [Matched]" " [Not readable]" " [Too big]")
703 "*List of strings used by ido to display the alternatives in the minibuffer. 711 "*List of strings used by ido to display the alternatives in the minibuffer.
704There are 9 elements in this list: 712There are 10 elements in this list:
7051st and 2nd elements are used as brackets around the prospect list, 7131st and 2nd elements are used as brackets around the prospect list,
7063rd element is the separator between prospects (ignored if ido-separator is set), 7143rd element is the separator between prospects (ignored if ido-separator is set),
7074th element is the string inserted at the end of a truncated list of prospects, 7154th element is the string inserted at the end of a truncated list of prospects,
@@ -709,7 +717,8 @@ There are 9 elements in this list:
709can be completed using TAB, 717can be completed using TAB,
7107th element is the string displayed when there are a no matches, and 7187th element is the string displayed when there are a no matches, and
7118th element is displayed if there is a single match (and faces are not used). 7198th element is displayed if there is a single match (and faces are not used).
7129th element is displayed when the current directory is non-readable." 7209th element is displayed when the current directory is non-readable.
72110th element is displayed when directory exceeds `ido-max-directory-size'."
713 :type '(repeat string) 722 :type '(repeat string)
714 :group 'ido) 723 :group 'ido)
715 724
@@ -952,6 +961,9 @@ it doesn't interfere with other minibuffer usage.")
952;; Remember if current directory is non-readable (so we cannot do completion). 961;; Remember if current directory is non-readable (so we cannot do completion).
953(defvar ido-directory-nonreadable) 962(defvar ido-directory-nonreadable)
954 963
964;; Remember if current directory is 'huge' (so we don't want to do completion).
965(defvar ido-directory-too-big)
966
955;; Keep current item list if non-nil. 967;; Keep current item list if non-nil.
956(defvar ido-keep-item-list) 968(defvar ido-keep-item-list)
957 969
@@ -1082,6 +1094,8 @@ it doesn't interfere with other minibuffer usage.")
1082(defun ido-may-cache-directory (&optional dir) 1094(defun ido-may-cache-directory (&optional dir)
1083 (setq dir (or dir ido-current-directory)) 1095 (setq dir (or dir ido-current-directory))
1084 (cond 1096 (cond
1097 ((ido-directory-too-big-p dir)
1098 nil)
1085 ((and (ido-is-root-directory dir) 1099 ((and (ido-is-root-directory dir)
1086 (or ido-enable-tramp-completion 1100 (or ido-enable-tramp-completion
1087 (memq system-type '(windows-nt ms-dos)))) 1101 (memq system-type '(windows-nt ms-dos))))
@@ -1425,6 +1439,16 @@ This function also adds a hook to the minibuffer."
1425 (file-directory-p dir) 1439 (file-directory-p dir)
1426 (not (file-readable-p dir))))) 1440 (not (file-readable-p dir)))))
1427 1441
1442(defun ido-directory-too-big-p (dir)
1443 ;; Return t if dir is a directory, but too big to show
1444 ;; Do not check for non-readable directories via tramp, as this causes a premature
1445 ;; connect on incomplete tramp paths (after entring just method:).
1446 (let ((ido-enable-tramp-completion nil))
1447 (and (numberp ido-max-directory-size)
1448 (ido-final-slash dir)
1449 (file-directory-p dir)
1450 (> (nth 7 (file-attributes dir)) ido-max-directory-size))))
1451
1428(defun ido-set-current-directory (dir &optional subdir no-merge) 1452(defun ido-set-current-directory (dir &optional subdir no-merge)
1429 ;; Set ido's current directory to DIR or DIR/SUBDIR 1453 ;; Set ido's current directory to DIR or DIR/SUBDIR
1430 (setq dir (ido-final-slash dir t)) 1454 (setq dir (ido-final-slash dir t))
@@ -1439,6 +1463,8 @@ This function also adds a hook to the minibuffer."
1439 (if (get-buffer ido-completion-buffer) 1463 (if (get-buffer ido-completion-buffer)
1440 (kill-buffer ido-completion-buffer)) 1464 (kill-buffer ido-completion-buffer))
1441 (setq ido-directory-nonreadable (ido-nonreadable-directory-p dir)) 1465 (setq ido-directory-nonreadable (ido-nonreadable-directory-p dir))
1466 (setq ido-directory-too-big (and (not ido-directory-nonreadable)
1467 (ido-directory-too-big-p dir)))
1442 t)) 1468 t))
1443 1469
1444(defun ido-set-current-home (&optional dir) 1470(defun ido-set-current-home (&optional dir)
@@ -1623,10 +1649,14 @@ If INITIAL is non-nil, it specifies the initial input string."
1623 ido-rescan nil)) 1649 ido-rescan nil))
1624 ((eq ido-cur-item 'file) 1650 ((eq ido-cur-item 'file)
1625 (setq ido-ignored-list nil 1651 (setq ido-ignored-list nil
1626 ido-cur-list (ido-make-file-list ido-default-item))) 1652 ido-cur-list (and (not ido-directory-nonreadable)
1653 (not ido-directory-too-big)
1654 (ido-make-file-list ido-default-item))))
1627 ((eq ido-cur-item 'dir) 1655 ((eq ido-cur-item 'dir)
1628 (setq ido-ignored-list nil 1656 (setq ido-ignored-list nil
1629 ido-cur-list (ido-make-dir-list ido-default-item))) 1657 ido-cur-list (and (not ido-directory-nonreadable)
1658 (not ido-directory-too-big)
1659 (ido-make-dir-list ido-default-item))))
1630 ((eq ido-cur-item 'buffer) 1660 ((eq ido-cur-item 'buffer)
1631 (setq ido-ignored-list nil 1661 (setq ido-ignored-list nil
1632 ido-cur-list (ido-make-buffer-list ido-default-item))) 1662 ido-cur-list (ido-make-buffer-list ido-default-item)))
@@ -1802,7 +1832,10 @@ If INITIAL is non-nil, it specifies the initial input string."
1802 (if (not ido-mode) 1832 (if (not ido-mode)
1803 (call-interactively (or fallback 'switch-to-buffer)) 1833 (call-interactively (or fallback 'switch-to-buffer))
1804 (let* ((ido-context-switch-command switch-cmd) 1834 (let* ((ido-context-switch-command switch-cmd)
1805 (buf (ido-read-buffer (or prompt "Buffer: ") default nil initial))) 1835 (ido-current-directory nil)
1836 (ido-directory-nonreadable nil)
1837 (ido-directory-too-big nil)
1838 (buf (ido-read-internal 'buffer (or prompt "Buffer: ") 'ido-buffer-history default nil initial)))
1806 1839
1807 ;; Choose the buffer name: either the text typed in, or the head 1840 ;; Choose the buffer name: either the text typed in, or the head
1808 ;; of the list of matches 1841 ;; of the list of matches
@@ -1845,19 +1878,6 @@ If INITIAL is non-nil, it specifies the initial input string."
1845 (set-buffer-major-mode buf)) 1878 (set-buffer-major-mode buf))
1846 (ido-visit-buffer buf method t)))))) 1879 (ido-visit-buffer buf method t))))))
1847 1880
1848;;;###autoload
1849(defun ido-read-buffer (prompt &optional default require-match initial)
1850 "Replacement for the built-in `read-buffer'.
1851Return the name of a buffer selected.
1852PROMPT is the prompt to give to the user. DEFAULT if given is the default
1853buffer to be selected, which will go to the front of the list.
1854If REQUIRE-MATCH is non-nil, an existing-buffer must be selected.
1855If INITIAL is non-nil, it specifies the initial input string."
1856 (let ((ido-current-directory nil)
1857 (ido-directory-nonreadable nil)
1858 (ido-context-switch-command (if (boundp 'ido-context-switch-command) ido-context-switch-command 'ignore)))
1859 (ido-read-internal 'buffer prompt 'ido-buffer-history default require-match initial)))
1860
1861(defun ido-record-work-directory (&optional dir) 1881(defun ido-record-work-directory (&optional dir)
1862 (when (and (numberp ido-max-work-directory-list) (> ido-max-work-directory-list 0)) 1882 (when (and (numberp ido-max-work-directory-list) (> ido-max-work-directory-list 0))
1863 (if (and (setq dir (or dir ido-current-directory)) (> (length dir) 0)) 1883 (if (and (setq dir (or dir ido-current-directory)) (> (length dir) 0))
@@ -1905,6 +1925,8 @@ If INITIAL is non-nil, it specifies the initial input string."
1905 (setq item 'file)) 1925 (setq item 'file))
1906 (let* ((ido-current-directory (ido-expand-directory default)) 1926 (let* ((ido-current-directory (ido-expand-directory default))
1907 (ido-directory-nonreadable (ido-nonreadable-directory-p ido-current-directory)) 1927 (ido-directory-nonreadable (ido-nonreadable-directory-p ido-current-directory))
1928 (ido-directory-too-big (and (not ido-directory-nonreadable)
1929 (ido-directory-too-big-p ido-current-directory)))
1908 (ido-context-switch-command switch-cmd) 1930 (ido-context-switch-command switch-cmd)
1909 filename) 1931 filename)
1910 1932
@@ -2079,6 +2101,12 @@ If INITIAL is non-nil, it specifies the initial input string."
2079 (setq ido-exit 'refresh) 2101 (setq ido-exit 'refresh)
2080 (exit-minibuffer)))) 2102 (exit-minibuffer))))
2081 2103
2104 (ido-directory-too-big
2105 (setq ido-directory-too-big nil)
2106 (setq ido-text-init ido-text)
2107 (setq ido-exit 'refresh)
2108 (exit-minibuffer))
2109
2082 ((not ido-matches) 2110 ((not ido-matches)
2083 (when ido-completion-buffer 2111 (when ido-completion-buffer
2084 (call-interactively (setq this-command ido-cannot-complete-command)))) 2112 (call-interactively (setq this-command ido-cannot-complete-command))))
@@ -2182,7 +2210,9 @@ If no merge has yet taken place, toggle automatic merging option."
2182(defun ido-toggle-ignore () 2210(defun ido-toggle-ignore ()
2183 "Toggle ignoring files specified with `ido-ignore-files'." 2211 "Toggle ignoring files specified with `ido-ignore-files'."
2184 (interactive) 2212 (interactive)
2185 (setq ido-process-ignore-lists (not ido-process-ignore-lists)) 2213 (if ido-directory-too-big
2214 (setq ido-directory-too-big nil)
2215 (setq ido-process-ignore-lists (not ido-process-ignore-lists)))
2186 (setq ido-text-init ido-text) 2216 (setq ido-text-init ido-text)
2187 (setq ido-exit 'refresh) 2217 (setq ido-exit 'refresh)
2188 (exit-minibuffer)) 2218 (exit-minibuffer))
@@ -2324,6 +2354,7 @@ If no buffer or file exactly matching the prompt exists, maybe create a new one.
2324 (not (equal dir ido-current-directory)) 2354 (not (equal dir ido-current-directory))
2325 (file-directory-p dir) 2355 (file-directory-p dir)
2326 (or (not must-match) 2356 (or (not must-match)
2357 ;; TODO. check for nonreadable and too-big.
2327 (ido-set-matches1 2358 (ido-set-matches1
2328 (if (eq ido-cur-item 'file) 2359 (if (eq ido-cur-item 'file)
2329 (ido-make-file-list1 dir) 2360 (ido-make-file-list1 dir)
@@ -2581,7 +2612,8 @@ for first matching file."
2581 2612
2582(defun ido-all-completions () 2613(defun ido-all-completions ()
2583 ;; Return unsorted list of all competions. 2614 ;; Return unsorted list of all competions.
2584 (let ((ido-process-ignore-lists nil)) 2615 (let ((ido-process-ignore-lists nil)
2616 (ido-directory-too-big nil))
2585 (cond 2617 (cond
2586 ((eq ido-cur-item 'file) 2618 ((eq ido-cur-item 'file)
2587 (ido-make-file-list1 ido-current-directory)) 2619 (ido-make-file-list1 ido-current-directory))
@@ -2700,6 +2732,7 @@ for first matching file."
2700 (or ido-merge-ftp-work-directories 2732 (or ido-merge-ftp-work-directories
2701 (not (ido-is-ftp-directory dir))) 2733 (not (ido-is-ftp-directory dir)))
2702 (file-directory-p dir) 2734 (file-directory-p dir)
2735 ;; TODO. check for nonreadable and too-big.
2703 (setq fl (if (eq ido-cur-item 'file) 2736 (setq fl (if (eq ido-cur-item 'file)
2704 (ido-make-file-list1 dir t) 2737 (ido-make-file-list1 dir t)
2705 (ido-make-dir-list1 dir t)))) 2738 (ido-make-dir-list1 dir t))))
@@ -2780,6 +2813,8 @@ for first matching file."
2780(defun ido-file-name-all-completions1 (dir) 2813(defun ido-file-name-all-completions1 (dir)
2781 (cond 2814 (cond
2782 ((ido-nonreadable-directory-p dir) '()) 2815 ((ido-nonreadable-directory-p dir) '())
2816 ;; do not check (ido-directory-too-big-p dir) here.
2817 ;; Caller must have done that if necessary.
2783 ((and ido-enable-tramp-completion 2818 ((and ido-enable-tramp-completion
2784 (string-match "\\`/\\([^/:]+:\\([^/:@]+@\\)?\\)\\'" dir)) 2819 (string-match "\\`/\\([^/:]+:\\([^/:@]+@\\)?\\)\\'" dir))
2785 2820
@@ -3616,7 +3651,7 @@ For details of keybindings, do `\\[describe-function] ido-find-file'."
3616 (expand-file-name "/" ido-current-directory) 3651 (expand-file-name "/" ido-current-directory)
3617 "/")) 3652 "/"))
3618 (setq refresh t)) 3653 (setq refresh t))
3619 ((and ido-directory-nonreadable 3654 ((and (or ido-directory-nonreadable ido-directory-too-big)
3620 (file-directory-p (concat ido-current-directory (file-name-directory contents)))) 3655 (file-directory-p (concat ido-current-directory (file-name-directory contents))))
3621 (ido-set-current-directory 3656 (ido-set-current-directory
3622 (concat ido-current-directory (file-name-directory contents))) 3657 (concat ido-current-directory (file-name-directory contents)))
@@ -3678,6 +3713,7 @@ For details of keybindings, do `\\[describe-function] ido-find-file'."
3678 3713
3679 (when (and (not ido-matches) 3714 (when (and (not ido-matches)
3680 (not ido-directory-nonreadable) 3715 (not ido-directory-nonreadable)
3716 (not ido-directory-too-big)
3681 ;; ido-rescan ? 3717 ;; ido-rescan ?
3682 ido-process-ignore-lists 3718 ido-process-ignore-lists
3683 ido-ignored-list) 3719 ido-ignored-list)
@@ -3701,7 +3737,8 @@ For details of keybindings, do `\\[describe-function] ido-find-file'."
3701 (not (ido-is-root-directory)) 3737 (not (ido-is-root-directory))
3702 (> (length contents) 1) 3738 (> (length contents) 1)
3703 (not (string-match "[$]" contents)) 3739 (not (string-match "[$]" contents))
3704 (not ido-directory-nonreadable)) 3740 (not ido-directory-nonreadable)
3741 (not ido-directory-too-big))
3705 (ido-trace "merge?") 3742 (ido-trace "merge?")
3706 (if ido-use-merged-list 3743 (if ido-use-merged-list
3707 (ido-undo-merge-work-directory contents nil) 3744 (ido-undo-merge-work-directory contents nil)
@@ -3766,6 +3803,8 @@ For details of keybindings, do `\\[describe-function] ido-find-file'."
3766 (cond 3803 (cond
3767 (ido-directory-nonreadable 3804 (ido-directory-nonreadable
3768 (or (nth 8 ido-decorations) " [Not readable]")) 3805 (or (nth 8 ido-decorations) " [Not readable]"))
3806 (ido-directory-too-big
3807 (or (nth 9 ido-decorations) " [Too big]"))
3769 (ido-report-no-match 3808 (ido-report-no-match
3770 (nth 6 ido-decorations)) ;; [No match] 3809 (nth 6 ido-decorations)) ;; [No match]
3771 (t ""))) 3810 (t "")))
@@ -3872,8 +3911,26 @@ For details of keybindings, do `\\[describe-function] ido-find-file'."
3872(put 'dired-do-rename 'ido 'ignore) 3911(put 'dired-do-rename 'ido 'ignore)
3873 3912
3874;;;###autoload 3913;;;###autoload
3914(defun ido-read-buffer (prompt &optional default require-match)
3915 "Ido replacement for the built-in `read-buffer'.
3916Return the name of a buffer selected.
3917PROMPT is the prompt to give to the user. DEFAULT if given is the default
3918buffer to be selected, which will go to the front of the list.
3919If REQUIRE-MATCH is non-nil, an existing-buffer must be selected."
3920 (let* ((ido-current-directory nil)
3921 (ido-directory-nonreadable nil)
3922 (ido-directory-too-big nil)
3923 (ido-context-switch-command 'ignore)
3924 (buf (ido-read-internal 'buffer prompt 'ido-buffer-history default require-match)))
3925 (if (eq ido-exit 'fallback)
3926 (let ((read-buffer-function nil))
3927 (read-buffer prompt default require-match))
3928 buf)))
3929
3930;;;###autoload
3875(defun ido-read-file-name (prompt &optional dir default-filename mustmatch initial predicate) 3931(defun ido-read-file-name (prompt &optional dir default-filename mustmatch initial predicate)
3876 "Read file name, prompting with PROMPT and completing in directory DIR. 3932 "Ido replacement for the built-in `read-file-name'.
3933Read file name, prompting with PROMPT and completing in directory DIR.
3877See `read-file-name' for additional parameters." 3934See `read-file-name' for additional parameters."
3878 (let (filename) 3935 (let (filename)
3879 (cond 3936 (cond
@@ -3890,6 +3947,8 @@ See `read-file-name' for additional parameters."
3890 (vc-handled-backends (and (boundp 'vc-handled-backends) vc-handled-backends)) 3947 (vc-handled-backends (and (boundp 'vc-handled-backends) vc-handled-backends))
3891 (ido-current-directory (ido-expand-directory dir)) 3948 (ido-current-directory (ido-expand-directory dir))
3892 (ido-directory-nonreadable (not (file-readable-p ido-current-directory))) 3949 (ido-directory-nonreadable (not (file-readable-p ido-current-directory)))
3950 (ido-directory-too-big (and (not ido-directory-nonreadable)
3951 (ido-directory-too-big-p ido-current-directory)))
3893 (ido-work-directory-index -1) 3952 (ido-work-directory-index -1)
3894 (ido-work-file-index -1) 3953 (ido-work-file-index -1)
3895 (ido-find-literal nil)) 3954 (ido-find-literal nil))
@@ -3911,13 +3970,16 @@ See `read-file-name' for additional parameters."
3911 3970
3912;;;###autoload 3971;;;###autoload
3913(defun ido-read-directory-name (prompt &optional dir default-dirname mustmatch initial) 3972(defun ido-read-directory-name (prompt &optional dir default-dirname mustmatch initial)
3914 "Read directory name, prompting with PROMPT and completing in directory DIR. 3973 "Ido replacement for the built-in `read-directory-name'.
3915See `read-file-name' for additional parameters." 3974Read directory name, prompting with PROMPT and completing in directory DIR.
3975See `read-directory-name' for additional parameters."
3916 (let* (filename 3976 (let* (filename
3917 (ido-context-switch-command 'ignore) 3977 (ido-context-switch-command 'ignore)
3918 ido-saved-vc-hb 3978 ido-saved-vc-hb
3919 (ido-current-directory (ido-expand-directory dir)) 3979 (ido-current-directory (ido-expand-directory dir))
3920 (ido-directory-nonreadable (not (file-readable-p ido-current-directory))) 3980 (ido-directory-nonreadable (not (file-readable-p ido-current-directory)))
3981 (ido-directory-too-big (and (not ido-directory-nonreadable)
3982 (ido-directory-too-big-p ido-current-directory)))
3921 (ido-work-directory-index -1) 3983 (ido-work-directory-index -1)
3922 (ido-work-file-index -1)) 3984 (ido-work-file-index -1))
3923 (setq filename 3985 (setq filename
@@ -3929,7 +3991,8 @@ See `read-file-name' for additional parameters."
3929 3991
3930;;;###autoload 3992;;;###autoload
3931(defun ido-completing-read (prompt choices &optional predicate require-match initial-input hist def) 3993(defun ido-completing-read (prompt choices &optional predicate require-match initial-input hist def)
3932 "Read a string in the minibuffer with ido-style completion. 3994 "Ido replacement for the built-in `completing-read'.
3995Read a string in the minibuffer with ido-style completion.
3933PROMPT is a string to prompt with; normally it ends in a colon and a space. 3996PROMPT is a string to prompt with; normally it ends in a colon and a space.
3934CHOICES is a list of strings which are the possible completions. 3997CHOICES is a list of strings which are the possible completions.
3935PREDICATE is currently ignored; it is included to be compatible 3998PREDICATE is currently ignored; it is included to be compatible
@@ -3944,6 +4007,7 @@ HIST, if non-nil, specifies a history list.
3944DEF, if non-nil, is the default value." 4007DEF, if non-nil, is the default value."
3945 (let ((ido-current-directory nil) 4008 (let ((ido-current-directory nil)
3946 (ido-directory-nonreadable nil) 4009 (ido-directory-nonreadable nil)
4010 (ido-directory-too-big nil)
3947 (ido-context-switch-command 'ignore) 4011 (ido-context-switch-command 'ignore)
3948 (ido-choice-list choices)) 4012 (ido-choice-list choices))
3949 (ido-read-internal 'list prompt hist def require-match initial-input))) 4013 (ido-read-internal 'list prompt hist def require-match initial-input)))