aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2014-03-03 03:27:08 +0100
committerJuanma Barranquero2014-03-03 03:27:08 +0100
commitd11320e517501ca90f3f9024241c6fb3490747f3 (patch)
tree76c442341d910fb158e348dbfc17e3ca66639f6f
parent185fbd27624cd1e16f32461b5271543f16b64263 (diff)
downloademacs-d11320e517501ca90f3f9024241c6fb3490747f3.tar.gz
emacs-d11320e517501ca90f3f9024241c6fb3490747f3.zip
lisp/icomplete.el, lisp/ido.el: Doc fixes.
lisp/icomplete.el: Miscellaneous doc fixes. Use Icomplete everywhere instead of icomplete for consistency. (icomplete-max-delay-chars): Fix typo. (icomplete-mode): Use \[]. (icomplete-tidy, icomplete-exhibit): Reflow. (icomplete-minibuffer-setup-hook, icomplete-completions): Remove superfluous backlashes. lisp/ido.el: Miscellaneous doc fixes. Use Ido everywhere instead of ido or `ido' for consistency. (ido-record-ftp-work-directories, ido-merge-ftp-work-directories) (ido-cache-ftp-work-directory-time, ido-slow-ftp-hosts) (ido-slow-ftp-host-regexps, ido-reread-directory): Upcase "ftp". (ido-separator): Extract obsolescence info from docstring and declare with make-obsolete-variable. (ido-minibuffer-setup-hook): Simplify example. (ido-text, ido-text-init, ido-input-stack, ido-report-no-match) (ido-wide-find-file, ido-wide-find-dir, ido-wide-find-dir-or-delete-dir) (ido-completion-help, ido-completing-read): Fix typos in docstrings. (ido-everywhere): Reflow docstring. (ido-toggle-vc): Doc fix. (ido-switch-buffer, ido-find-file): Use tabs to improve legibility of long list of keybindings.
-rw-r--r--lisp/ChangeLog26
-rw-r--r--lisp/icomplete.el40
-rw-r--r--lisp/ido.el307
3 files changed, 203 insertions, 170 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 9c3a7ac9945..5c3362611f6 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,29 @@
12014-03-03 Juanma Barranquero <lekktu@gmail.com>
2
3 * icomplete.el: Miscellaneous doc fixes.
4 Use Icomplete everywhere instead of icomplete for consistency.
5 (icomplete-max-delay-chars): Fix typo.
6 (icomplete-mode): Use \[].
7 (icomplete-tidy, icomplete-exhibit): Reflow.
8 (icomplete-minibuffer-setup-hook, icomplete-completions):
9 Remove superfluous backlashes.
10
11 * ido.el: Miscellaneous doc fixes.
12 Use Ido everywhere instead of ido or `ido' for consistency.
13 (ido-record-ftp-work-directories, ido-merge-ftp-work-directories)
14 (ido-cache-ftp-work-directory-time, ido-slow-ftp-hosts)
15 (ido-slow-ftp-host-regexps, ido-reread-directory): Upcase "ftp".
16 (ido-separator): Extract obsolescence info from docstring and declare
17 with make-obsolete-variable.
18 (ido-minibuffer-setup-hook): Simplify example.
19 (ido-text, ido-text-init, ido-input-stack, ido-report-no-match)
20 (ido-wide-find-file, ido-wide-find-dir, ido-wide-find-dir-or-delete-dir)
21 (ido-completion-help, ido-completing-read): Fix typos in docstrings.
22 (ido-everywhere): Reflow docstring.
23 (ido-toggle-vc): Doc fix.
24 (ido-switch-buffer, ido-find-file): Use tabs to improve legibility
25 of long list of keybindings.
26
12014-03-03 Glenn Morris <rgm@gnu.org> 272014-03-03 Glenn Morris <rgm@gnu.org>
2 28
3 * frame.el (display-pixel-height, display-pixel-width) 29 * frame.el (display-pixel-height, display-pixel-width)
diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index 626d63914d8..35e441b87f3 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -61,7 +61,7 @@
61 'icomplete-prospects-length 'icomplete-prospects-height "23.1") 61 'icomplete-prospects-length 'icomplete-prospects-height "23.1")
62 62
63(defcustom icomplete-separator " | " 63(defcustom icomplete-separator " | "
64 "String used by icomplete to separate alternatives in the minibuffer." 64 "String used by Icomplete to separate alternatives in the minibuffer."
65 :type 'string 65 :type 'string
66 :version "24.4") 66 :version "24.4")
67 67
@@ -77,7 +77,7 @@ When nil, show candidates in full."
77 :version "24.4") 77 :version "24.4")
78 78
79(defcustom icomplete-with-completion-tables t 79(defcustom icomplete-with-completion-tables t
80 "Specialized completion tables with which icomplete should operate. 80 "Specialized completion tables with which Icomplete should operate.
81If this is t, Icomplete operates on all tables. 81If this is t, Icomplete operates on all tables.
82Otherwise this should be a list of the completion tables (e.g., 82Otherwise this should be a list of the completion tables (e.g.,
83`internal-complete-buffer') on which Icomplete should operate." 83`internal-complete-buffer') on which Icomplete should operate."
@@ -87,7 +87,7 @@ Otherwise this should be a list of the completion tables (e.g.,
87 (repeat function))) 87 (repeat function)))
88 88
89(defface icomplete-first-match '((t :weight bold)) 89(defface icomplete-first-match '((t :weight bold))
90 "Face used by icomplete for highlighting first match." 90 "Face used by Icomplete for highlighting first match."
91 :version "24.4") 91 :version "24.4")
92 92
93;;;_* User Customization variables 93;;;_* User Customization variables
@@ -109,7 +109,7 @@ See `icomplete-delay-completions-threshold'."
109 :type 'integer) 109 :type 'integer)
110 110
111(defcustom icomplete-max-delay-chars 3 111(defcustom icomplete-max-delay-chars 3
112 "Maximum number of initial chars to apply icomplete compute delay." 112 "Maximum number of initial chars to apply `icomplete-compute-delay'."
113 :type 'integer) 113 :type 'integer)
114 114
115(defvar icomplete-in-buffer nil 115(defvar icomplete-in-buffer nil
@@ -118,12 +118,12 @@ See `icomplete-delay-completions-threshold'."
118(defcustom icomplete-minibuffer-setup-hook nil 118(defcustom icomplete-minibuffer-setup-hook nil
119 "Icomplete-specific customization of minibuffer setup. 119 "Icomplete-specific customization of minibuffer setup.
120 120
121This hook is run during minibuffer setup if icomplete is active. 121This hook is run during minibuffer setup if Icomplete is active.
122It is intended for use in customizing icomplete for interoperation 122It is intended for use in customizing Icomplete for interoperation
123with other features and packages. For instance: 123with other features and packages. For instance:
124 124
125 \(add-hook 'icomplete-minibuffer-setup-hook 125 (add-hook 'icomplete-minibuffer-setup-hook
126 \(lambda () (setq-local max-mini-window-height 3))) 126 (lambda () (setq-local max-mini-window-height 3)))
127 127
128will constrain Emacs to a maximum minibuffer height of 3 lines when 128will constrain Emacs to a maximum minibuffer height of 3 lines when
129icompletion is occurring." 129icompletion is occurring."
@@ -197,7 +197,7 @@ the string you have typed. See `icomplete-completions' for a
197description of how prospective completions are displayed. 197description of how prospective completions are displayed.
198 198
199For more information, see Info node `(emacs)Icomplete'. 199For more information, see Info node `(emacs)Icomplete'.
200For options you can set, `M-x customize-group icomplete'. 200For options you can set, `\\[customize-group] icomplete'.
201 201
202You can use the following key bindings to navigate and select 202You can use the following key bindings to navigate and select
203completions: 203completions:
@@ -295,16 +295,16 @@ Usually run by inclusion in `minibuffer-setup-hook'."
295 295
296;;;_ > icomplete-tidy () 296;;;_ > icomplete-tidy ()
297(defun icomplete-tidy () 297(defun icomplete-tidy ()
298 "Remove completions display \(if any) prior to new user input. 298 "Remove completions display (if any) prior to new user input.
299Should be run in on the minibuffer `pre-command-hook'. See `icomplete-mode' 299Should be run in on the minibuffer `pre-command-hook'.
300and `minibuffer-setup-hook'." 300See `icomplete-mode' and `minibuffer-setup-hook'."
301 (delete-overlay icomplete-overlay)) 301 (delete-overlay icomplete-overlay))
302 302
303;;;_ > icomplete-exhibit () 303;;;_ > icomplete-exhibit ()
304(defun icomplete-exhibit () 304(defun icomplete-exhibit ()
305 "Insert icomplete completions display. 305 "Insert Icomplete completions display.
306Should be run via minibuffer `post-command-hook'. See `icomplete-mode' 306Should be run via minibuffer `post-command-hook'.
307and `minibuffer-setup-hook'." 307See `icomplete-mode' and `minibuffer-setup-hook'."
308 (when (and icomplete-mode 308 (when (and icomplete-mode
309 (icomplete-simple-completing-p)) ;Shouldn't be necessary. 309 (icomplete-simple-completing-p)) ;Shouldn't be necessary.
310 (save-excursion 310 (save-excursion
@@ -352,17 +352,17 @@ The display is updated with each minibuffer keystroke during
352minibuffer completion. 352minibuffer completion.
353 353
354Prospective completion suffixes (if any) are displayed, bracketed by 354Prospective completion suffixes (if any) are displayed, bracketed by
355one of \(), \[], or \{} pairs. The choice of brackets is as follows: 355one of (), [], or {} pairs. The choice of brackets is as follows:
356 356
357 \(...) - a single prospect is identified and matching is enforced, 357 (...) - a single prospect is identified and matching is enforced,
358 \[...] - a single prospect is identified but matching is optional, or 358 [...] - a single prospect is identified but matching is optional, or
359 \{...} - multiple prospects, separated by commas, are indicated, and 359 {...} - multiple prospects, separated by commas, are indicated, and
360 further input is required to distinguish a single one. 360 further input is required to distinguish a single one.
361 361
362If there are multiple possibilities, `icomplete-separator' separates them. 362If there are multiple possibilities, `icomplete-separator' separates them.
363 363
364The displays for unambiguous matches have ` [Matched]' appended 364The displays for unambiguous matches have ` [Matched]' appended
365\(whether complete or not), or ` \[No matches]', if no eligible 365\(whether complete or not), or ` [No matches]', if no eligible
366matches exist." 366matches exist."
367 (let* ((minibuffer-completion-table candidates) 367 (let* ((minibuffer-completion-table candidates)
368 (minibuffer-completion-predicate predicate) 368 (minibuffer-completion-predicate predicate)
diff --git a/lisp/ido.el b/lisp/ido.el
index 9267274e0db..b16ab1f91a6 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -162,7 +162,7 @@
162;; 162;;
163;; The standard way of completion with Unix-shells and Emacs is to insert a 163;; The standard way of completion with Unix-shells and Emacs is to insert a
164;; PREFIX and then hitting TAB (or another completion key). Cause of this 164;; PREFIX and then hitting TAB (or another completion key). Cause of this
165;; behavior has become second nature to a lot of Emacs users `ido' offers in 165;; behavior has become second nature to a lot of Emacs users, Ido offers in
166;; addition to the default substring-matching-method (look above) also the 166;; addition to the default substring-matching-method (look above) also the
167;; prefix-matching-method. The kind of matching is the only difference to 167;; prefix-matching-method. The kind of matching is the only difference to
168;; the description of the substring-matching above. 168;; the description of the substring-matching above.
@@ -206,7 +206,7 @@
206;; Customization 206;; Customization
207;; ------------- 207;; -------------
208;; 208;;
209;; Customize the `ido' group to change the `ido' functionality. 209;; Customize the Ido group to change the Ido functionality.
210;; 210;;
211;; To modify the keybindings, use the ido-setup-hook. For example: 211;; To modify the keybindings, use the ido-setup-hook. For example:
212;;(add-hook 'ido-setup-hook 'ido-my-keys) 212;;(add-hook 'ido-setup-hook 'ido-my-keys)
@@ -277,7 +277,7 @@
277;; If you don't want to rely on the `ido-everywhere' functionality, 277;; If you don't want to rely on the `ido-everywhere' functionality,
278;; ido-read-buffer, ido-read-file-name, and ido-read-directory-name 278;; ido-read-buffer, ido-read-file-name, and ido-read-directory-name
279;; can be used by other packages to read a buffer name, a file name, 279;; can be used by other packages to read a buffer name, a file name,
280;; or a directory name in the `ido' way. 280;; or a directory name in the Ido way.
281 281
282;;; Acknowledgments 282;;; Acknowledgments
283 283
@@ -345,11 +345,11 @@
345(defcustom ido-mode nil 345(defcustom ido-mode nil
346 "Determines for which buffer/file Ido should be enabled. 346 "Determines for which buffer/file Ido should be enabled.
347The following values are possible: 347The following values are possible:
348- `buffer': Turn only on ido buffer behavior (switching, killing, 348- `buffer': Turn only on Ido buffer behavior (switching, killing,
349 displaying...) 349 displaying...)
350- `file': Turn only on ido file behavior (finding, writing, inserting...) 350- `file': Turn only on Ido file behavior (finding, writing, inserting...)
351- `both': Turn on ido buffer and file behavior. 351- `both': Turn on Ido buffer and file behavior.
352- nil: Turn off any ido switching. 352- nil: Turn off any Ido switching.
353 353
354Setting this variable directly does not take effect; 354Setting this variable directly does not take effect;
355use either \\[customize] or the function `ido-mode'." 355use either \\[customize] or the function `ido-mode'."
@@ -467,7 +467,7 @@ See `ido-default-file-method' for details."
467 :group 'ido) 467 :group 'ido)
468 468
469(defcustom ido-enable-flex-matching nil 469(defcustom ido-enable-flex-matching nil
470 "Non-nil means that `ido' will do flexible string matching. 470 "Non-nil means that Ido will do flexible string matching.
471Flexible matching means that if the entered string does not 471Flexible matching means that if the entered string does not
472match any item, any item containing the entered characters 472match any item, any item containing the entered characters
473in the given sequence will match." 473in the given sequence will match."
@@ -476,8 +476,8 @@ in the given sequence will match."
476 476
477 477
478(defcustom ido-enable-regexp nil 478(defcustom ido-enable-regexp nil
479 "Non-nil means that `ido' will do regexp matching. 479 "Non-nil means that Ido will do regexp matching.
480Value can be toggled within `ido' using `ido-toggle-regexp'." 480Value can be toggled within Ido using `ido-toggle-regexp'."
481 :type 'boolean 481 :type 'boolean
482 :group 'ido) 482 :group 'ido)
483 483
@@ -485,7 +485,7 @@ Value can be toggled within `ido' using `ido-toggle-regexp'."
485 "Non-nil means only match if the entered text is a prefix of file name. 485 "Non-nil means only match if the entered text is a prefix of file name.
486This behavior is like the standard Emacs completion. 486This behavior is like the standard Emacs completion.
487If nil, match if the entered text is an arbitrary substring. 487If nil, match if the entered text is an arbitrary substring.
488Value can be toggled within `ido' using `ido-toggle-prefix'." 488Value can be toggled within Ido using `ido-toggle-prefix'."
489 :type 'boolean 489 :type 'boolean
490 :group 'ido) 490 :group 'ido)
491 491
@@ -499,7 +499,7 @@ as first char even if `ido-enable-prefix' is nil."
499;; See http://debbugs.gnu.org/2042 for more info. 499;; See http://debbugs.gnu.org/2042 for more info.
500(defcustom ido-buffer-disable-smart-matches t 500(defcustom ido-buffer-disable-smart-matches t
501 "Non-nil means not to re-order matches for buffer switching. 501 "Non-nil means not to re-order matches for buffer switching.
502By default, ido arranges matches in the following order: 502By default, Ido arranges matches in the following order:
503 503
504 full-matches > suffix matches > prefix matches > remaining matches 504 full-matches > suffix matches > prefix matches > remaining matches
505 505
@@ -564,7 +564,7 @@ the frame width."
564 :group 'ido) 564 :group 'ido)
565 565
566(defcustom ido-enable-last-directory-history t 566(defcustom ido-enable-last-directory-history t
567 "Non-nil means that `ido' will remember latest selected directory names. 567 "Non-nil means that Ido will remember latest selected directory names.
568See `ido-last-directory-list' and `ido-save-directory-list-file'." 568See `ido-last-directory-list' and `ido-save-directory-list-file'."
569 :type 'boolean 569 :type 'boolean
570 :group 'ido) 570 :group 'ido)
@@ -585,7 +585,7 @@ the `ido-work-directory-list' list."
585 585
586 586
587(defcustom ido-use-filename-at-point nil 587(defcustom ido-use-filename-at-point nil
588 "Non-nil means that ido shall look for a filename at point. 588 "Non-nil means that Ido shall look for a filename at point.
589May use `ffap-guesser' to guess whether text at point is a filename. 589May use `ffap-guesser' to guess whether text at point is a filename.
590If found, use that as the starting point for filename selection." 590If found, use that as the starting point for filename selection."
591 :type '(choice 591 :type '(choice
@@ -603,38 +603,38 @@ If found, call `find-file-at-point' to visit it."
603 603
604 604
605(defcustom ido-enable-tramp-completion t 605(defcustom ido-enable-tramp-completion t
606 "Non-nil means that ido shall perform tramp method and server name completion. 606 "Non-nil means that Ido shall perform tramp method and server name completion.
607A tramp file name uses the following syntax: /method:user@host:filename." 607A tramp file name uses the following syntax: /method:user@host:filename."
608 :type 'boolean 608 :type 'boolean
609 :group 'ido) 609 :group 'ido)
610 610
611(defcustom ido-record-ftp-work-directories t 611(defcustom ido-record-ftp-work-directories t
612 "Non-nil means record ftp file names in the work directory list." 612 "Non-nil means record FTP file names in the work directory list."
613 :type 'boolean 613 :type 'boolean
614 :group 'ido) 614 :group 'ido)
615 615
616(defcustom ido-merge-ftp-work-directories nil 616(defcustom ido-merge-ftp-work-directories nil
617 "If nil, merging ignores ftp file names in the work directory list." 617 "If nil, merging ignores FTP file names in the work directory list."
618 :type 'boolean 618 :type 'boolean
619 :group 'ido) 619 :group 'ido)
620 620
621(defcustom ido-cache-ftp-work-directory-time 1.0 621(defcustom ido-cache-ftp-work-directory-time 1.0
622 "Maximum time to cache contents of an ftp directory (in hours). 622 "Maximum time to cache contents of an FTP directory (in hours).
623\\<ido-file-completion-map> 623\\<ido-file-completion-map>
624Use \\[ido-reread-directory] in prompt to refresh list. 624Use \\[ido-reread-directory] in prompt to refresh list.
625If zero, ftp directories are not cached." 625If zero, FTP directories are not cached."
626 :type 'number 626 :type 'number
627 :group 'ido) 627 :group 'ido)
628 628
629(defcustom ido-slow-ftp-hosts nil 629(defcustom ido-slow-ftp-hosts nil
630 "List of slow ftp hosts where ido prompting should not be used. 630 "List of slow FTP hosts where Ido prompting should not be used.
631If an ftp host is on this list, ido automatically switches to the non-ido 631If an FTP host is on this list, Ido automatically switches to the non-Ido
632equivalent function, e.g. `find-file' rather than `ido-find-file'." 632equivalent function, e.g. `find-file' rather than `ido-find-file'."
633 :type '(repeat string) 633 :type '(repeat string)
634 :group 'ido) 634 :group 'ido)
635 635
636(defcustom ido-slow-ftp-host-regexps nil 636(defcustom ido-slow-ftp-host-regexps nil
637 "List of regexps matching slow ftp hosts (see `ido-slow-ftp-hosts')." 637 "List of regexps matching slow FTP hosts (see `ido-slow-ftp-hosts')."
638 :type '(repeat regexp) 638 :type '(repeat regexp)
639 :group 'ido) 639 :group 'ido)
640 640
@@ -726,16 +726,16 @@ See also `ido-dir-file-cache' and `ido-save-directory-list-file'."
726 :group 'ido) 726 :group 'ido)
727 727
728(defcustom ido-max-directory-size nil 728(defcustom ido-max-directory-size nil
729 "Maximum size (in bytes) for directories to use ido completion. 729 "Maximum size (in bytes) for directories to use Ido completion.
730\\<ido-completion-map> 730\\<ido-completion-map>
731If you enter a directory with a size larger than this size, ido will 731If you enter a directory with a size larger than this size, Ido will
732not provide the normal completion. To show the completions, use \\[ido-toggle-ignore]." 732not provide the normal completion. To show the completions, use \\[ido-toggle-ignore]."
733 :type '(choice (const :tag "No limit" nil) 733 :type '(choice (const :tag "No limit" nil)
734 (integer :tag "Size in bytes" 30000)) 734 (integer :tag "Size in bytes" 30000))
735 :group 'ido) 735 :group 'ido)
736 736
737(defcustom ido-rotate-file-list-default nil 737(defcustom ido-rotate-file-list-default nil
738 "Non-nil means that `ido' will always rotate file list to get default in front." 738 "Non-nil means that Ido will always rotate file list to get default in front."
739 :type 'boolean 739 :type 'boolean
740 :group 'ido) 740 :group 'ido)
741 741
@@ -762,21 +762,23 @@ ask user whether to create buffer, or 'never to never create new buffer."
762 :group 'ido) 762 :group 'ido)
763 763
764(defcustom ido-setup-hook nil 764(defcustom ido-setup-hook nil
765 "Hook run after the ido variables and keymap have been setup. 765 "Hook run after the Ido variables and keymap have been setup.
766The dynamic variable `ido-cur-item' contains the current type of item that 766The dynamic variable `ido-cur-item' contains the current type of item that
767is read by ido; possible values are file, dir, buffer, and list. 767is read by Ido; possible values are file, dir, buffer, and list.
768Additional keys can be defined in `ido-completion-map'." 768Additional keys can be defined in `ido-completion-map'."
769 :type 'hook 769 :type 'hook
770 :group 'ido) 770 :group 'ido)
771 771
772(defcustom ido-separator nil 772(defcustom ido-separator nil
773 "String used by ido to separate the alternatives in the minibuffer. 773 "String used by Ido to separate the alternatives in the minibuffer."
774Obsolete. Set 3rd element of `ido-decorations' instead."
775 :type '(choice string (const nil)) 774 :type '(choice string (const nil))
776 :group 'ido) 775 :group 'ido)
776(make-obsolete-variable 'ido-separator
777 "set 3rd element of `ido-decorations' instead." nil)
777 778
778(defcustom ido-decorations '( "{" "}" " | " " | ..." "[" "]" " [No match]" " [Matched]" " [Not readable]" " [Too big]" " [Confirm]") 779(defcustom ido-decorations '("{" "}" " | " " | ..." "[" "]" " [No match]"
779 "List of strings used by ido to display the alternatives in the minibuffer. 780 " [Matched]" " [Not readable]" " [Too big]" " [Confirm]")
781 "List of strings used by Ido to display the alternatives in the minibuffer.
780There are between 11 and 13 elements in this list: 782There are between 11 and 13 elements in this list:
7811st and 2nd elements are used as brackets around the prospect list, 7831st and 2nd elements are used as brackets around the prospect list,
7823rd element is the separator between prospects (ignored if 7843rd element is the separator between prospects (ignored if
@@ -820,19 +822,19 @@ enabled if this variable is configured to a non-nil value."
820 :group 'ido) 822 :group 'ido)
821 823
822(defcustom ido-use-faces t 824(defcustom ido-use-faces t
823 "Non-nil means use ido faces to highlighting first match, only match and 825 "Non-nil means use Ido faces to highlighting first match, only match and
824subdirs in the alternatives." 826subdirs in the alternatives."
825 :type 'boolean 827 :type 'boolean
826 :group 'ido) 828 :group 'ido)
827 829
828(defface ido-first-match '((t :weight bold)) 830(defface ido-first-match '((t :weight bold))
829 "Face used by ido for highlighting first match." 831 "Face used by Ido for highlighting first match."
830 :group 'ido) 832 :group 'ido)
831 833
832(defface ido-only-match '((((class color)) 834(defface ido-only-match '((((class color))
833 :foreground "ForestGreen") 835 :foreground "ForestGreen")
834 (t :slant italic)) 836 (t :slant italic))
835 "Face used by ido for highlighting only match." 837 "Face used by Ido for highlighting only match."
836 :group 'ido) 838 :group 'ido)
837 839
838(defface ido-subdir '((((min-colors 88) (class color)) 840(defface ido-subdir '((((min-colors 88) (class color))
@@ -840,11 +842,11 @@ subdirs in the alternatives."
840 (((class color)) 842 (((class color))
841 :foreground "red") 843 :foreground "red")
842 (t :underline t)) 844 (t :underline t))
843 "Face used by ido for highlighting subdirs in the alternatives." 845 "Face used by Ido for highlighting subdirs in the alternatives."
844 :group 'ido) 846 :group 'ido)
845 847
846(defface ido-virtual '((t :inherit font-lock-builtin-face)) 848(defface ido-virtual '((t :inherit font-lock-builtin-face))
847 "Face used by ido for matching virtual buffer names." 849 "Face used by Ido for matching virtual buffer names."
848 :version "24.1" 850 :version "24.1"
849 :group 'ido) 851 :group 'ido)
850 852
@@ -853,7 +855,7 @@ subdirs in the alternatives."
853 (((class color)) 855 (((class color))
854 :foreground "yellow" :background "red" :width condensed) 856 :foreground "yellow" :background "red" :width condensed)
855 (t :inverse-video t)) 857 (t :inverse-video t))
856 "Face used by ido for highlighting its indicators." 858 "Face used by Ido for highlighting its indicators."
857 :group 'ido) 859 :group 'ido)
858 860
859(defface ido-incomplete-regexp 861(defface ido-incomplete-regexp
@@ -901,7 +903,7 @@ The following variables are available, but should not be changed:
901 :group 'ido) 903 :group 'ido)
902 904
903(defvar ido-rewrite-file-prompt-rules nil 905(defvar ido-rewrite-file-prompt-rules nil
904 "Alist of rewriting rules for directory names in ido prompts. 906 "Alist of rewriting rules for directory names in Ido prompts.
905A list of elements of the form (FROM . TO) or (FROM . FUNC), each 907A list of elements of the form (FROM . TO) or (FROM . FUNC), each
906meaning to rewrite the directory name if matched by FROM by either 908meaning to rewrite the directory name if matched by FROM by either
907substituting the matched string by TO or calling the function FUNC 909substituting the matched string by TO or calling the function FUNC
@@ -911,7 +913,7 @@ also modify the dynamic variables described for the variable
911`ido-rewrite-file-prompt-functions'.") 913`ido-rewrite-file-prompt-functions'.")
912 914
913(defcustom ido-completion-buffer "*Ido Completions*" 915(defcustom ido-completion-buffer "*Ido Completions*"
914 "Name of completion buffer used by ido. 916 "Name of completion buffer used by Ido.
915Set to nil to disable completion buffers popping up." 917Set to nil to disable completion buffers popping up."
916 :type 'string 918 :type 'string
917 :group 'ido) 919 :group 'ido)
@@ -934,40 +936,37 @@ See documentation of `walk-windows' for useful values."
934(defcustom ido-minibuffer-setup-hook nil 936(defcustom ido-minibuffer-setup-hook nil
935 "Ido-specific customization of minibuffer setup. 937 "Ido-specific customization of minibuffer setup.
936 938
937This hook is run during minibuffer setup if `ido' is active. 939This hook is run during minibuffer setup if Ido is active.
938It is intended for use in customizing ido for interoperation 940It is intended for use in customizing Ido for interoperation
939with other packages. For instance: 941with other packages. For instance:
940 942
941 \(add-hook 'ido-minibuffer-setup-hook 943 (add-hook 'ido-minibuffer-setup-hook
942 \(function 944 (lambda () (setq-local max-mini-window-height 3)))
943 \(lambda ()
944 \(make-local-variable 'max-mini-window-height)
945 \(setq max-mini-window-height 3))))
946 945
947will constrain Emacs to a maximum minibuffer height of 3 lines when 946will constrain Emacs to a maximum minibuffer height of 3 lines when
948ido is running. Copied from `icomplete-minibuffer-setup-hook'." 947Ido is running. Copied from `icomplete-minibuffer-setup-hook'."
949 :type 'hook 948 :type 'hook
950 :group 'ido) 949 :group 'ido)
951 950
952(defcustom ido-save-directory-list-file 951(defcustom ido-save-directory-list-file
953 (locate-user-emacs-file "ido.last" ".ido.last") 952 (locate-user-emacs-file "ido.last" ".ido.last")
954 "File in which the ido state is saved between invocations. 953 "File in which the Ido state is saved between invocations.
955Variables stored are: `ido-last-directory-list', `ido-work-directory-list', 954Variables stored are: `ido-last-directory-list', `ido-work-directory-list',
956`ido-work-file-list', and `ido-dir-file-cache'. 955`ido-work-file-list', and `ido-dir-file-cache'.
957Must be set before enabling ido mode." 956Must be set before enabling Ido mode."
958 :version "24.4" ; added locate-user-emacs-file 957 :version "24.4" ; added locate-user-emacs-file
959 :type 'string 958 :type 'string
960 :group 'ido) 959 :group 'ido)
961 960
962(defcustom ido-read-file-name-as-directory-commands '() 961(defcustom ido-read-file-name-as-directory-commands '()
963 "List of commands which uses `read-file-name' to read a directory name. 962 "List of commands which use `read-file-name' to read a directory name.
964When `ido-everywhere' is non-nil, the commands in this list will read 963When `ido-everywhere' is non-nil, the commands in this list will read
965the directory using `ido-read-directory-name'." 964the directory using `ido-read-directory-name'."
966 :type '(repeat symbol) 965 :type '(repeat symbol)
967 :group 'ido) 966 :group 'ido)
968 967
969(defcustom ido-read-file-name-non-ido '() 968(defcustom ido-read-file-name-non-ido '()
970 "List of commands which shall not read file names the ido way. 969 "List of commands which shall not read file names the Ido way.
971When `ido-everywhere' is non-nil, the commands in this list will read 970When `ido-everywhere' is non-nil, the commands in this list will read
972the file name using normal `read-file-name' style." 971the file name using normal `read-file-name' style."
973 :type '(repeat symbol) 972 :type '(repeat symbol)
@@ -984,19 +983,19 @@ The fallback command is passed as an argument to the functions."
984;; Persistent variables 983;; Persistent variables
985 984
986(defvar ido-completion-map nil 985(defvar ido-completion-map nil
987 "Currently active keymap for ido commands.") 986 "Currently active keymap for Ido commands.")
988 987
989(defvar ido-common-completion-map nil 988(defvar ido-common-completion-map nil
990 "Keymap for all ido commands.") 989 "Keymap for all Ido commands.")
991 990
992(defvar ido-file-completion-map nil 991(defvar ido-file-completion-map nil
993 "Keymap for ido file commands.") 992 "Keymap for Ido file commands.")
994 993
995(defvar ido-file-dir-completion-map nil 994(defvar ido-file-dir-completion-map nil
996 "Keymap for ido file and directory commands.") 995 "Keymap for Ido file and directory commands.")
997 996
998(defvar ido-buffer-completion-map nil 997(defvar ido-buffer-completion-map nil
999 "Keymap for ido buffer commands.") 998 "Keymap for Ido buffer commands.")
1000 999
1001(defvar ido-file-history nil 1000(defvar ido-file-history nil
1002 "History of files selected using `ido-find-file'.") 1001 "History of files selected using `ido-find-file'.")
@@ -1024,8 +1023,8 @@ at the front of this list.")
1024Each element in the list is of the form (DIR (MTIME) FILE...).") 1023Each element in the list is of the form (DIR (MTIME) FILE...).")
1025 1024
1026(defvar ido-ignore-item-temp-list nil 1025(defvar ido-ignore-item-temp-list nil
1027 "List of items to ignore in current ido invocation. 1026 "List of items to ignore in current Ido invocation.
1028Intended to be let-bound by functions which call ido repeatedly. 1027Intended to be let-bound by functions which call Ido repeatedly.
1029Should never be set permanently.") 1028Should never be set permanently.")
1030 1029
1031;; Temporary storage 1030;; Temporary storage
@@ -1045,19 +1044,19 @@ Copied from `icomplete-eoinput'.")
1045 "Non-nil means we are rotating list of matches.") 1044 "Non-nil means we are rotating list of matches.")
1046 1045
1047(defvar ido-text nil 1046(defvar ido-text nil
1048 "Stores the users string as it is typed in.") 1047 "Stores the user's string as it is typed in.")
1049 1048
1050(defvar ido-text-init nil 1049(defvar ido-text-init nil
1051 "The initial string for the users string it is typed in.") 1050 "The initial string for the user's string it is typed in.")
1052 1051
1053(defvar ido-input-stack nil 1052(defvar ido-input-stack nil
1054 "Stores the users strings when user hits M-b/M-f.") 1053 "Stores the user's strings when user hits M-b/M-f.")
1055 1054
1056(defvar ido-matches nil 1055(defvar ido-matches nil
1057 "List of files currently matching `ido-text'.") 1056 "List of files currently matching `ido-text'.")
1058 1057
1059(defvar ido-report-no-match t 1058(defvar ido-report-no-match t
1060 "Report [No Match] when no completions matches `ido-text'.") 1059 "Report \"[No Match]\" when no completions matches `ido-text'.")
1061 1060
1062(defvar ido-exit nil 1061(defvar ido-exit nil
1063 "Flag to monitor how `ido-find-file' exits. 1062 "Flag to monitor how `ido-find-file' exits.
@@ -1071,8 +1070,8 @@ selected.")
1071 "Delay timer for auto merge.") 1070 "Delay timer for auto merge.")
1072 1071
1073(defvar ido-use-mycompletion-depth 0 1072(defvar ido-use-mycompletion-depth 0
1074 "Non-nil means use `ido' completion feedback. 1073 "Non-nil means use Ido completion feedback.
1075Is set by ido functions to the current `minibuffer-depth', 1074Is set by Ido functions to the current `minibuffer-depth',
1076so that it doesn't interfere with other minibuffer usage.") 1075so that it doesn't interfere with other minibuffer usage.")
1077 1076
1078(defvar ido-incomplete-regexp nil 1077(defvar ido-incomplete-regexp nil
@@ -1283,7 +1282,8 @@ Only used if `ido-use-virtual-buffers' is non-nil.")
1283(defun ido-is-ftp-directory (&optional dir) 1282(defun ido-is-ftp-directory (&optional dir)
1284 (string-match 1283 (string-match
1285 (if ido-enable-tramp-completion 1284 (if ido-enable-tramp-completion
1286 "\\`/[^/:][^/:]+:" ;; like tramp-file-name-regexp-unified, but doesn't match single drive letters 1285 ;; like tramp-file-name-regexp-unified, but doesn't match single drive letters
1286 "\\`/[^/:][^/:]+:"
1287 "\\`/[^/:][^/:]+:/") 1287 "\\`/[^/:][^/:]+:/")
1288 (or dir ido-current-directory))) 1288 (or dir ido-current-directory)))
1289 1289
@@ -1353,7 +1353,7 @@ Only used if `ido-use-virtual-buffers' is non-nil.")
1353 (insert "\n)\n"))) 1353 (insert "\n)\n")))
1354 1354
1355(defun ido-save-history () 1355(defun ido-save-history ()
1356 "Save ido history and cache information between sessions." 1356 "Save Ido history and cache information between sessions."
1357 (interactive) 1357 (interactive)
1358 (when (and ido-last-directory-list ido-save-directory-list-file) 1358 (when (and ido-last-directory-list ido-save-directory-list-file)
1359 (let ((buf (get-buffer-create " *ido session*")) 1359 (let ((buf (get-buffer-create " *ido session*"))
@@ -1374,7 +1374,7 @@ Only used if `ido-use-virtual-buffers' is non-nil.")
1374 (kill-buffer buf))))) 1374 (kill-buffer buf)))))
1375 1375
1376(defun ido-load-history (&optional arg) 1376(defun ido-load-history (&optional arg)
1377 "Load ido history and cache information from previous session. 1377 "Load Ido history and cache information from previous session.
1378With prefix argument, reload history unconditionally." 1378With prefix argument, reload history unconditionally."
1379 (interactive "P") 1379 (interactive "P")
1380 (if (or arg (and ido-save-directory-list-file (not ido-last-directory-list))) 1380 (if (or arg (and ido-save-directory-list-file (not ido-last-directory-list)))
@@ -1397,7 +1397,7 @@ With prefix argument, reload history unconditionally."
1397 (ido-wash-history)) 1397 (ido-wash-history))
1398 1398
1399(defun ido-wash-history () 1399(defun ido-wash-history ()
1400 "Clean-up ido history and cache information. 1400 "Clean-up Ido history and cache information.
1401Removes badly formatted data and ignored directories." 1401Removes badly formatted data and ignored directories."
1402 (interactive) 1402 (interactive)
1403 ;; Check format of each of our lists, discard bogus elements 1403 ;; Check format of each of our lists, discard bogus elements
@@ -1510,8 +1510,8 @@ Removes badly formatted data and ignored directories."
1510(define-minor-mode ido-everywhere 1510(define-minor-mode ido-everywhere
1511 "Toggle use of Ido for all buffer/file reading. 1511 "Toggle use of Ido for all buffer/file reading.
1512With a prefix argument ARG, enable this feature if ARG is 1512With a prefix argument ARG, enable this feature if ARG is
1513positive, and disable it otherwise. If called from Lisp, enable 1513positive, and disable it otherwise. If called from Lisp,
1514the mode if ARG is omitted or nil." 1514enable the mode if ARG is omitted or nil."
1515 :global t 1515 :global t
1516 :group 'ido 1516 :group 'ido
1517 (when (get 'ido-everywhere 'file) 1517 (when (get 'ido-everywhere 'file)
@@ -1532,11 +1532,11 @@ the mode if ARG is omitted or nil."
1532 1532
1533;;;###autoload 1533;;;###autoload
1534(defun ido-mode (&optional arg) 1534(defun ido-mode (&optional arg)
1535 "Toggle ido mode on or off. 1535 "Toggle Ido mode on or off.
1536With ARG, turn ido-mode on if arg is positive, off otherwise. 1536With ARG, turn Ido mode on if arg is positive, off otherwise.
1537Turning on ido-mode will remap (via a minor-mode keymap) the default 1537Turning on Ido mode will remap (via a minor-mode keymap) the default
1538keybindings for the `find-file' and `switch-to-buffer' families of 1538keybindings for the `find-file' and `switch-to-buffer' families of
1539commands to the ido versions of these functions. 1539commands to the Ido versions of these functions.
1540However, if ARG arg equals 'files, remap only commands for files, or 1540However, if ARG arg equals 'files, remap only commands for files, or
1541if it equals 'buffers, remap only commands for buffer switching. 1541if it equals 'buffers, remap only commands for buffer switching.
1542This function also adds a hook to the minibuffer." 1542This function also adds a hook to the minibuffer."
@@ -1598,7 +1598,7 @@ This function also adds a hook to the minibuffer."
1598 1598
1599;;; IDO KEYMAP 1599;;; IDO KEYMAP
1600(defun ido-init-completion-maps () 1600(defun ido-init-completion-maps ()
1601 "Set up the completion keymaps used by `ido'." 1601 "Set up the completion keymaps used by Ido."
1602 1602
1603 ;; Common map 1603 ;; Common map
1604 (let ((map (make-sparse-keymap))) 1604 (let ((map (make-sparse-keymap)))
@@ -1679,7 +1679,7 @@ This function also adds a hook to the minibuffer."
1679 1679
1680 1680
1681(defun ido-setup-completion-map () 1681(defun ido-setup-completion-map ()
1682 "Set up the keymap for `ido'." 1682 "Set up the keymap for Ido."
1683 1683
1684 ;; generated every time so that it can inherit new functions. 1684 ;; generated every time so that it can inherit new functions.
1685 (let ((map (make-sparse-keymap)) 1685 (let ((map (make-sparse-keymap))
@@ -2205,7 +2205,7 @@ If INITIAL is non-nil, it specifies the initial input string."
2205 ido-selected)) 2205 ido-selected))
2206 2206
2207(defun ido-edit-input () 2207(defun ido-edit-input ()
2208 "Edit absolute file name entered so far with ido; terminate by RET. 2208 "Edit absolute file name entered so far with Ido; terminate by RET.
2209If cursor is not at the end of the user input, move to end of input." 2209If cursor is not at the end of the user input, move to end of input."
2210 (interactive) 2210 (interactive)
2211 (if (not (eobp)) 2211 (if (not (eobp))
@@ -2616,7 +2616,7 @@ If cursor is not at the end of the user input, move to end of input."
2616 (ido-complete))) 2616 (ido-complete)))
2617 2617
2618(defun ido-undo-merge-work-directory (&optional text try refresh) 2618(defun ido-undo-merge-work-directory (&optional text try refresh)
2619 "Undo or redo last ido directory merge operation. 2619 "Undo or redo last Ido directory merge operation.
2620If no merge has yet taken place, toggle automatic merging option." 2620If no merge has yet taken place, toggle automatic merging option."
2621 (interactive) 2621 (interactive)
2622 (cond 2622 (cond
@@ -2648,9 +2648,9 @@ If no merge has yet taken place, toggle automatic merging option."
2648 "Move forward in user input or perform magic action. 2648 "Move forward in user input or perform magic action.
2649If no user input is present, or at end of input, perform magic actions: 2649If no user input is present, or at end of input, perform magic actions:
2650C-x C-b ... C-f switch to `ido-find-file'. 2650C-x C-b ... C-f switch to `ido-find-file'.
2651C-x C-f ... C-f fallback to non-ido `find-file'. 2651C-x C-f ... C-f fallback to non-Ido `find-file'.
2652C-x C-d ... C-f fallback to non-ido brief `dired'. 2652C-x C-d ... C-f fallback to non-Ido brief `dired'.
2653C-x d ... C-f fallback to non-ido `dired'." 2653C-x d ... C-f fallback to non-Ido `dired'."
2654 (interactive "P") 2654 (interactive "P")
2655 (cond 2655 (cond
2656 ((or arg (not (eobp))) 2656 ((or arg (not (eobp)))
@@ -2671,7 +2671,7 @@ If no user input is present, or at start of input, perform magic actions:
2671C-x C-f C-b switch to `ido-switch-buffer'. 2671C-x C-f C-b switch to `ido-switch-buffer'.
2672C-x C-d C-b switch to `ido-switch-buffer'. 2672C-x C-d C-b switch to `ido-switch-buffer'.
2673C-x d C-b switch to `ido-switch-buffer'. 2673C-x d C-b switch to `ido-switch-buffer'.
2674C-x C-b C-b fallback to non-ido `switch-to-buffer'." 2674C-x C-b C-b fallback to non-Ido `switch-to-buffer'."
2675 (interactive "P") 2675 (interactive "P")
2676 (cond 2676 (cond
2677 ((or arg (> (point) (minibuffer-prompt-end))) 2677 ((or arg (> (point) (minibuffer-prompt-end)))
@@ -2744,7 +2744,7 @@ C-x C-f ... C-d enter `dired' on current directory."
2744 (exit-minibuffer))) 2744 (exit-minibuffer)))
2745 2745
2746(defun ido-toggle-vc () 2746(defun ido-toggle-vc ()
2747 "Disable version control for this file." 2747 "Toggle version control for this file."
2748 (interactive) 2748 (interactive)
2749 (if (and ido-mode (eq ido-cur-item 'file)) 2749 (if (and ido-mode (eq ido-cur-item 'file))
2750 (progn 2750 (progn
@@ -2781,7 +2781,7 @@ See `ido-use-virtual-buffers' for explanation of virtual buffer."
2781(defun ido-reread-directory () 2781(defun ido-reread-directory ()
2782 "Read current directory again. 2782 "Read current directory again.
2783May be useful if cached version is no longer valid, but directory 2783May be useful if cached version is no longer valid, but directory
2784timestamp has not changed (e.g. with ftp or on Windows)." 2784timestamp has not changed (e.g. with FTP or on Windows)."
2785 (interactive) 2785 (interactive)
2786 (if (and ido-mode (memq ido-cur-item '(file dir))) 2786 (if (and ido-mode (memq ido-cur-item '(file dir)))
2787 (progn 2787 (progn
@@ -2815,7 +2815,7 @@ If no buffer or file exactly matching the prompt exists, maybe create a new one.
2815 (exit-minibuffer)) 2815 (exit-minibuffer))
2816 2816
2817(defun ido-fallback-command () 2817(defun ido-fallback-command ()
2818 "Fallback to non-ido version of current command." 2818 "Fallback to non-Ido version of current command."
2819 (interactive) 2819 (interactive)
2820 (let ((i (length ido-text))) 2820 (let ((i (length ido-text)))
2821 (while (> i 0) 2821 (while (> i 0)
@@ -2949,7 +2949,7 @@ If no buffer or file exactly matching the prompt exists, maybe create a new one.
2949 (exit-minibuffer)) 2949 (exit-minibuffer))
2950 2950
2951(defun ido-wide-find-file (&optional file) 2951(defun ido-wide-find-file (&optional file)
2952 "Prompt for FILE to search for using find, starting from current directory." 2952 "Prompt for FILE to search for using `find', starting from current directory."
2953 (interactive) 2953 (interactive)
2954 (unless file 2954 (unless file
2955 (let ((enable-recursive-minibuffers t)) 2955 (let ((enable-recursive-minibuffers t))
@@ -2965,7 +2965,7 @@ If no buffer or file exactly matching the prompt exists, maybe create a new one.
2965 (exit-minibuffer))) 2965 (exit-minibuffer)))
2966 2966
2967(defun ido-wide-find-dir (&optional dir) 2967(defun ido-wide-find-dir (&optional dir)
2968 "Prompt for DIR to search for using find, starting from current directory." 2968 "Prompt for DIR to search for using `find', starting from current directory."
2969 (interactive) 2969 (interactive)
2970 (unless dir 2970 (unless dir
2971 (let ((enable-recursive-minibuffers t)) 2971 (let ((enable-recursive-minibuffers t))
@@ -2981,7 +2981,7 @@ If no buffer or file exactly matching the prompt exists, maybe create a new one.
2981 (exit-minibuffer))) 2981 (exit-minibuffer)))
2982 2982
2983(defun ido-wide-find-dir-or-delete-dir (&optional _dir) 2983(defun ido-wide-find-dir-or-delete-dir (&optional _dir)
2984 "Prompt for DIR to search for using find, starting from current directory. 2984 "Prompt for DIR to search for using `find', starting from current directory.
2985If input stack is non-empty, delete current directory component." 2985If input stack is non-empty, delete current directory component."
2986 (interactive) 2986 (interactive)
2987 (if ido-input-stack 2987 (if ido-input-stack
@@ -3938,7 +3938,7 @@ If `ido-change-word-sub' cannot be found in WORD, return nil."
3938 t)) 3938 t))
3939 3939
3940(defun ido-completion-help () 3940(defun ido-completion-help ()
3941 "Show possible completions in a *File Completions* buffer." 3941 "Show possible completions in a \"*File Completions*\" buffer."
3942 (interactive) 3942 (interactive)
3943 (setq ido-rescan nil) 3943 (setq ido-rescan nil)
3944 (let ((temp-buf (and ido-completion-buffer 3944 (let ((temp-buf (and ido-completion-buffer
@@ -4119,31 +4119,31 @@ default is to show it in the same window, unless it is already visible
4119in another frame. 4119in another frame.
4120 4120
4121As you type in a string, all of the buffers matching the string are 4121As you type in a string, all of the buffers matching the string are
4122displayed if substring-matching is used \(default). Look at 4122displayed if substring-matching is used (default). Look at
4123`ido-enable-prefix' and `ido-toggle-prefix'. When you have found the 4123`ido-enable-prefix' and `ido-toggle-prefix'. When you have found the
4124buffer you want, it can then be selected. As you type, most keys have 4124buffer you want, it can then be selected. As you type, most keys have
4125their normal keybindings, except for the following: \\<ido-buffer-completion-map> 4125their normal keybindings, except for the following: \\<ido-buffer-completion-map>
4126 4126
4127RET Select the buffer at the front of the list of matches. If the 4127RET\tSelect the buffer at the front of the list of matches.
4128list is empty, possibly prompt to create new buffer. 4128\tIf the list is empty, possibly prompt to create new buffer.
4129 4129
4130\\[ido-select-text] Use the current input string verbatim. 4130\\[ido-select-text]\tUse the current input string verbatim.
4131 4131
4132\\[ido-next-match] Put the first element at the end of the list. 4132\\[ido-next-match]\tPut the first element at the end of the list.
4133\\[ido-prev-match] Put the last element at the start of the list. 4133\\[ido-prev-match]\tPut the last element at the start of the list.
4134\\[ido-complete] Complete a common suffix to the current string that 4134\\[ido-complete]\tComplete a common suffix to the current string that matches
4135matches all buffers. If there is only one match, select that buffer. 4135\tall buffers. If there is only one match, select that buffer.
4136If there is no common suffix, show a list of all matching buffers 4136\tIf there is no common suffix, show a list of all matching buffers
4137in a separate window. 4137\tin a separate window.
4138\\[ido-edit-input] Edit input string. 4138\\[ido-edit-input]\tEdit input string.
4139\\[ido-fallback-command] Fallback to non-ido version of current command. 4139\\[ido-fallback-command]\tFallback to non-ido version of current command.
4140\\[ido-toggle-regexp] Toggle regexp searching. 4140\\[ido-toggle-regexp]\tToggle regexp searching.
4141\\[ido-toggle-prefix] Toggle between substring and prefix matching. 4141\\[ido-toggle-prefix]\tToggle between substring and prefix matching.
4142\\[ido-toggle-case] Toggle case-sensitive searching of buffer names. 4142\\[ido-toggle-case]\tToggle case-sensitive searching of buffer names.
4143\\[ido-completion-help] Show list of matching buffers in separate window. 4143\\[ido-completion-help]\tShow list of matching buffers in separate window.
4144\\[ido-enter-find-file] Drop into `ido-find-file'. 4144\\[ido-enter-find-file]\tDrop into `ido-find-file'.
4145\\[ido-kill-buffer-at-head] Kill buffer at head of buffer list. 4145\\[ido-kill-buffer-at-head]\tKill buffer at head of buffer list.
4146\\[ido-toggle-ignore] Toggle ignoring buffers listed in `ido-ignore-buffers'." 4146\\[ido-toggle-ignore]\tToggle ignoring buffers listed in `ido-ignore-buffers'."
4147 (interactive) 4147 (interactive)
4148 (ido-buffer-internal ido-default-buffer-method)) 4148 (ido-buffer-internal ido-default-buffer-method))
4149 4149
@@ -4169,7 +4169,8 @@ For details of keybindings, see `ido-switch-buffer'."
4169The buffer name is selected interactively by typing a substring. 4169The buffer name is selected interactively by typing a substring.
4170For details of keybindings, see `ido-switch-buffer'." 4170For details of keybindings, see `ido-switch-buffer'."
4171 (interactive) 4171 (interactive)
4172 (ido-buffer-internal 'kill 'kill-buffer "Kill buffer: " (buffer-name (current-buffer)) nil 'ignore)) 4172 (ido-buffer-internal 'kill 'kill-buffer "Kill buffer: "
4173 (buffer-name (current-buffer)) nil 'ignore))
4173 4174
4174;;;###autoload 4175;;;###autoload
4175(defun ido-insert-buffer () 4176(defun ido-insert-buffer ()
@@ -4177,7 +4178,8 @@ For details of keybindings, see `ido-switch-buffer'."
4177The buffer name is selected interactively by typing a substring. 4178The buffer name is selected interactively by typing a substring.
4178For details of keybindings, see `ido-switch-buffer'." 4179For details of keybindings, see `ido-switch-buffer'."
4179 (interactive) 4180 (interactive)
4180 (ido-buffer-internal 'insert 'insert-buffer "Insert buffer: " nil nil 'ido-enter-insert-file)) 4181 (ido-buffer-internal 'insert 'insert-buffer "Insert buffer: "
4182 nil nil 'ido-enter-insert-file))
4181 4183
4182;;;###autoload 4184;;;###autoload
4183(defun ido-switch-buffer-other-frame () 4185(defun ido-switch-buffer-other-frame ()
@@ -4200,42 +4202,45 @@ For details of keybindings, see `ido-switch-buffer'."
4200(defun ido-find-file () 4202(defun ido-find-file ()
4201 "Edit file with name obtained via minibuffer. 4203 "Edit file with name obtained via minibuffer.
4202The file is displayed according to `ido-default-file-method' -- the 4204The file is displayed according to `ido-default-file-method' -- the
4203default is to show it in the same window, unless it is already 4205default is to show it in the same window, unless it is already visible
4204visible in another frame. 4206in another frame.
4205 4207
4206The file name is selected interactively by typing a substring. As you 4208The file name is selected interactively by typing a substring. As you
4207type in a string, all of the filenames matching the string are displayed 4209type in a string, all of the filenames matching the string are displayed
4208if substring-matching is used \(default). Look at `ido-enable-prefix' and 4210if substring-matching is used (default). Look at `ido-enable-prefix' and
4209`ido-toggle-prefix'. When you have found the filename you want, it can 4211`ido-toggle-prefix'. When you have found the filename you want, it can
4210then be selected. As you type, most keys have their normal keybindings, 4212then be selected. As you type, most keys have their normal keybindings,
4211except for the following: \\<ido-file-completion-map> 4213except for the following: \\<ido-file-completion-map>
4212 4214
4213RET Select the file at the front of the list of matches. If the 4215RET\tSelect the file at the front of the list of matches.
4214list is empty, possibly prompt to create new file. 4216\tIf the list is empty, possibly prompt to create new file.
4215 4217
4216\\[ido-select-text] Use the current input string verbatim. 4218\\[ido-select-text]\tUse the current input string verbatim.
4217 4219
4218\\[ido-next-match] Put the first element at the end of the list. 4220\\[ido-next-match]\tPut the first element at the end of the list.
4219\\[ido-prev-match] Put the last element at the start of the list. 4221\\[ido-prev-match]\tPut the last element at the start of the list.
4220\\[ido-complete] Complete a common suffix to the current string that 4222\\[ido-complete]\tComplete a common suffix to the current string that matches
4221matches all files. If there is only one match, select that file. 4223\tall files. If there is only one match, select that file.
4222If there is no common suffix, show a list of all matching files 4224\tIf there is no common suffix, show a list of all matching files
4223in a separate window. 4225\tin a separate window.
4224\\[ido-magic-delete-char] Open the specified directory in Dired mode. 4226\\[ido-magic-delete-char]\tOpen the specified directory in Dired mode.
4225\\[ido-edit-input] Edit input string (including directory). 4227\\[ido-edit-input]\tEdit input string (including directory).
4226\\[ido-prev-work-directory] or \\[ido-next-work-directory] go to previous/next directory in work directory history. 4228\\[ido-prev-work-directory]\tGo to previous directory in work directory history.
4227\\[ido-merge-work-directories] search for file in the work directory history. 4229\\[ido-next-work-directory]\tGo to next directory in work directory history.
4228\\[ido-forget-work-directory] removes current directory from the work directory history. 4230\\[ido-merge-work-directories]\tSearch for file in the work directory history.
4229\\[ido-prev-work-file] or \\[ido-next-work-file] cycle through the work file history. 4231\\[ido-forget-work-directory]\tRemove current directory from the work directory history.
4230\\[ido-wide-find-file-or-pop-dir] and \\[ido-wide-find-dir-or-delete-dir] prompts and uses find to locate files or directories. 4232\\[ido-prev-work-file]\tCycle to previous file in work file history.
4231\\[ido-make-directory] prompts for a directory to create in current directory. 4233\\[ido-next-work-file]\tCycle to next file in work file history.
4232\\[ido-fallback-command] Fallback to non-ido version of current command. 4234\\[ido-wide-find-file-or-pop-dir]\tPrompt for a file and use find to locate it.
4233\\[ido-toggle-regexp] Toggle regexp searching. 4235\\[ido-wide-find-dir-or-delete-dir]\tPrompt for a directory and use find to locate it.
4234\\[ido-toggle-prefix] Toggle between substring and prefix matching. 4236\\[ido-make-directory]\tPrompt for a directory to create in current directory.
4235\\[ido-toggle-case] Toggle case-sensitive searching of file names. 4237\\[ido-fallback-command]\tFallback to non-Ido version of current command.
4236\\[ido-toggle-literal] Toggle literal reading of this file. 4238\\[ido-toggle-regexp]\tToggle regexp searching.
4237\\[ido-completion-help] Show list of matching files in separate window. 4239\\[ido-toggle-prefix]\tToggle between substring and prefix matching.
4238\\[ido-toggle-ignore] Toggle ignoring files listed in `ido-ignore-files'." 4240\\[ido-toggle-case]\tToggle case-sensitive searching of file names.
4241\\[ido-toggle-literal]\tToggle literal reading of this file.
4242\\[ido-completion-help]\tShow list of matching files in separate window.
4243\\[ido-toggle-ignore]\tToggle ignoring files listed in `ido-ignore-files'."
4239 4244
4240 (interactive) 4245 (interactive)
4241 (ido-file-internal ido-default-file-method)) 4246 (ido-file-internal ido-default-file-method))
@@ -4270,7 +4275,8 @@ For details of keybindings, see `ido-find-file'."
4270The file name is selected interactively by typing a substring. 4275The file name is selected interactively by typing a substring.
4271For details of keybindings, see `ido-find-file'." 4276For details of keybindings, see `ido-find-file'."
4272 (interactive) 4277 (interactive)
4273 (ido-file-internal 'read-only 'find-file-read-only-other-window nil "Find file read-only other window: ")) 4278 (ido-file-internal 'read-only 'find-file-read-only-other-window nil
4279 "Find file read-only other window: "))
4274 4280
4275;;;###autoload 4281;;;###autoload
4276(defun ido-find-file-read-only-other-frame () 4282(defun ido-find-file-read-only-other-frame ()
@@ -4278,7 +4284,8 @@ For details of keybindings, see `ido-find-file'."
4278The file name is selected interactively by typing a substring. 4284The file name is selected interactively by typing a substring.
4279For details of keybindings, see `ido-find-file'." 4285For details of keybindings, see `ido-find-file'."
4280 (interactive) 4286 (interactive)
4281 (ido-file-internal 'read-only 'find-file-read-only-other-frame nil "Find file read-only other frame: ")) 4287 (ido-file-internal 'read-only 'find-file-read-only-other-frame nil
4288 "Find file read-only other frame: "))
4282 4289
4283;;;###autoload 4290;;;###autoload
4284(defun ido-display-file () 4291(defun ido-display-file ()
@@ -4320,7 +4327,7 @@ For details of keybindings, see `ido-find-file'."
4320 4327
4321;;;###autoload 4328;;;###autoload
4322(defun ido-dired () 4329(defun ido-dired ()
4323 "Call `dired' the ido way. 4330 "Call `dired' the Ido way.
4324The directory is selected interactively by typing a substring. 4331The directory is selected interactively by typing a substring.
4325For details of keybindings, see `ido-find-file'." 4332For details of keybindings, see `ido-find-file'."
4326 (interactive) 4333 (interactive)
@@ -4329,7 +4336,7 @@ For details of keybindings, see `ido-find-file'."
4329 (ido-file-internal 'dired 'dired nil "Dired: " 'dir))) 4336 (ido-file-internal 'dired 'dired nil "Dired: " 'dir)))
4330 4337
4331(defun ido-list-directory () 4338(defun ido-list-directory ()
4332 "Call `list-directory' the ido way. 4339 "Call `list-directory' the Ido way.
4333The directory is selected interactively by typing a substring. 4340The directory is selected interactively by typing a substring.
4334For details of keybindings, see `ido-find-file'." 4341For details of keybindings, see `ido-find-file'."
4335 (interactive) 4342 (interactive)
@@ -4367,7 +4374,7 @@ For details of keybindings, see `ido-find-file'."
4367 (throw 'ido contents)))) 4374 (throw 'ido contents))))
4368 4375
4369(defun ido-exhibit () 4376(defun ido-exhibit ()
4370 "Post command hook for `ido'." 4377 "Post command hook for Ido."
4371 ;; Find matching files and display a list in the minibuffer. 4378 ;; Find matching files and display a list in the minibuffer.
4372 ;; Copied from `icomplete-exhibit' with two changes: 4379 ;; Copied from `icomplete-exhibit' with two changes:
4373 ;; 1. It prints a default file name when there is no text yet entered. 4380 ;; 1. It prints a default file name when there is no text yet entered.
@@ -4695,7 +4702,7 @@ Modified from `icomplete-completions'."
4695 (nth 1 ido-decorations))))))) 4702 (nth 1 ido-decorations)))))))
4696 4703
4697(defun ido-minibuffer-setup () 4704(defun ido-minibuffer-setup ()
4698 "Minibuffer setup hook for `ido'." 4705 "Minibuffer setup hook for Ido."
4699 ;; Copied from `icomplete-minibuffer-setup-hook'. 4706 ;; Copied from `icomplete-minibuffer-setup-hook'.
4700 (when (ido-active) 4707 (when (ido-active)
4701 (add-hook 'pre-command-hook 'ido-tidy nil t) 4708 (add-hook 'pre-command-hook 'ido-tidy nil t)
@@ -4709,7 +4716,7 @@ Modified from `icomplete-completions'."
4709 (setq ido-initial-position nil)))) 4716 (setq ido-initial-position nil))))
4710 4717
4711(defun ido-tidy () 4718(defun ido-tidy ()
4712 "Pre command hook for `ido'." 4719 "Pre command hook for Ido."
4713 ;; Remove completions display, if any, prior to new user input. 4720 ;; Remove completions display, if any, prior to new user input.
4714 ;; Copied from `icomplete-tidy'." 4721 ;; Copied from `icomplete-tidy'."
4715 4722
@@ -4868,10 +4875,10 @@ See `read-directory-name' for additional parameters."
4868(defun ido-completing-read (prompt choices &optional _predicate require-match 4875(defun ido-completing-read (prompt choices &optional _predicate require-match
4869 initial-input hist def _inherit-input-method) 4876 initial-input hist def _inherit-input-method)
4870 "Ido replacement for the built-in `completing-read'. 4877 "Ido replacement for the built-in `completing-read'.
4871Read a string in the minibuffer with ido-style completion. 4878Read a string in the minibuffer with Ido-style completion.
4872PROMPT is a string to prompt with; normally it ends in a colon and a space. 4879PROMPT is a string to prompt with; normally it ends in a colon and a space.
4873CHOICES is a list of strings which are the possible completions. 4880CHOICES is a list of strings which are the possible completions.
4874PREDICATE and INHERIT-INPUT-METHOD is currently ignored; it is included 4881PREDICATE and INHERIT-INPUT-METHOD are currently ignored; they are included
4875 to be compatible with `completing-read'. 4882 to be compatible with `completing-read'.
4876If REQUIRE-MATCH is non-nil, the user is not allowed to exit unless 4883If REQUIRE-MATCH is non-nil, the user is not allowed to exit unless
4877 the input is (or completes to) an element of CHOICES or is null. 4884 the input is (or completes to) an element of CHOICES or is null.