comparison lisp/ido.el @ 49438:389e078f2b48

Many doc fixes. (ido-complete): Fix message.
author Richard M. Stallman <rms@gnu.org>
date Sat, 25 Jan 2003 19:42:15 +0000
parents 0c9686a92a39
children e19c547c5487
comparison
equal deleted inserted replaced
49437:3a18e49975cb 49438:389e078f2b48
342 342
343 ;;;###autoload 343 ;;;###autoload
344 (defcustom ido-mode nil 344 (defcustom ido-mode nil
345 "Determines for which functional group \(buffer and files) ido behavior 345 "Determines for which functional group \(buffer and files) ido behavior
346 should be enabled. The following values are possible: 346 should be enabled. The following values are possible:
347 - 'buffer: Turn only on ido buffer behavior \(switching, killing, 347 - `buffer': Turn only on ido buffer behavior \(switching, killing,
348 displaying...) 348 displaying...)
349 - 'file: Turn only on ido file behavior \(finding, writing, inserting...) 349 - `file': Turn only on ido file behavior \(finding, writing, inserting...)
350 - 'both: Turn on ido buffer and file behavior. 350 - `both': Turn on ido buffer and file behavior.
351 - nil: Turn off any ido switching. 351 - `nil': Turn off any ido switching.
352 352
353 Setting this variable directly does not take effect; 353 Setting this variable directly does not take effect;
354 use either \\[customize] or the function `ido-mode'." 354 use either \\[customize] or the function `ido-mode'."
355 :set #'(lambda (symbol value) 355 :set #'(lambda (symbol value)
356 (ido-mode value)) 356 (ido-mode value))
558 A tramp file name uses the following syntax: /method:user@host:filename." 558 A tramp file name uses the following syntax: /method:user@host:filename."
559 :type 'boolean 559 :type 'boolean
560 :group 'ido) 560 :group 'ido)
561 561
562 (defcustom ido-record-ftp-work-directories t 562 (defcustom ido-record-ftp-work-directories t
563 "*Non-nil means that remote directories are recorded in work directory list." 563 "*Non-nil means record ftp file names in the work directory list."
564 :type 'boolean 564 :type 'boolean
565 :group 'ido) 565 :group 'ido)
566 566
567 (defcustom ido-merge-ftp-work-directories nil 567 (defcustom ido-merge-ftp-work-directories nil
568 "*Nil means that remote directories in work directory list are ignored during merge." 568 "*If nil means merging ignores ftp file names in the work directory list."
569 :type 'boolean 569 :type 'boolean
570 :group 'ido) 570 :group 'ido)
571 571
572 (defcustom ido-cache-ftp-work-directory-time 1.0 572 (defcustom ido-cache-ftp-work-directory-time 1.0
573 "*Maximum time to cache contents of an ftp directory (in hours). 573 "*Maximum time to cache contents of an ftp directory (in hours).
737 737
738 (defcustom ido-rewrite-file-prompt-functions nil 738 (defcustom ido-rewrite-file-prompt-functions nil
739 "*List of functions to run when the find-file prompt is created. 739 "*List of functions to run when the find-file prompt is created.
740 Each function on the list may modify the following dynamically bound 740 Each function on the list may modify the following dynamically bound
741 variables: 741 variables:
742 dirname - the (abbreviated) directory name to be modified by the hook functions 742 dirname - the (abbreviated) directory name
743 max-width - the max width of the resulting dirname; set to nil to inhibit truncation 743 to be modified by the hook functions
744 prompt - the basic prompt (e.g. \"Find File: \") 744 max-width - the max width of the resulting dirname; nil means no limit
745 literal - the string shown if doing `literal' find; set to nil to omit 745 prompt - the basic prompt (e.g. \"Find File: \")
746 vc-off - the string shown if version control is inhibited; set to nit to omit 746 literal - the string shown if doing \"literal\" find; set to nil to omit
747 prefix - normally nil, but may be set to a fixed prefix for the dirname 747 vc-off - the string shown if version control is inhibited; set to nit to omit
748 prefix - either nil or a fixed prefix for the dirname
749
748 The following variables are available, but should not be changed: 750 The following variables are available, but should not be changed:
749 ido-current-directory - the unabbreviated directory name 751 ido-current-directory - the unabbreviated directory name
750 item - equals 'file or 'dir depending on the current mode." 752 item - equals `file' or `dir' depending on the current mode."
751 :type 'hook 753 :type 'hook
752 :group 'ido) 754 :group 'ido)
753 755
754 (defvar ido-rewrite-file-prompt-rules nil 756 (defvar ido-rewrite-file-prompt-rules nil
755 "*Alist of rewriting rules for directory names in ido prompts. 757 "*Alist of rewriting rules for directory names in ido prompts.
839 The current directory is inserted at the front of this list whenever a 841 The current directory is inserted at the front of this list whenever a
840 file is opened with ido-find-file and family.") 842 file is opened with ido-find-file and family.")
841 843
842 (defvar ido-work-file-list nil 844 (defvar ido-work-file-list nil
843 "List of actual work file names. 845 "List of actual work file names.
844 The current file name (sans directory) is inserted at the front of this list 846 Opening a file with `ido-find-file' and similar functions
845 whenever a file is opened with ido-find-file and family.") 847 inserts the current file name (relative to its containing directory)
848 at the front of this list.")
846 849
847 (defvar ido-dir-file-cache nil 850 (defvar ido-dir-file-cache nil
848 "List of file-name-all-completions results. 851 "List of `file-name-all-completions' results.
849 Each element in the list is of the form (dir (mtime) file...).") 852 Each element in the list is of the form (DIR (MTIME) FILE...).")
850 853
851 (defvar ido-ignore-item-temp-list nil 854 (defvar ido-ignore-item-temp-list nil
852 "List of items to ignore in current ido invocation. 855 "List of items to ignore in current ido invocation.
853 Intended to be let-bound by functions which calls ido repeatedly. 856 Intended to be let-bound by functions which calls ido repeatedly.
854 Should never be set permanently.") 857 Should never be set permanently.")
1956 (cond 1959 (cond
1957 ((and (memq ido-cur-item '(file dir)) 1960 ((and (memq ido-cur-item '(file dir))
1958 (string-match "[$]" ido-text)) 1961 (string-match "[$]" ido-text))
1959 (let ((evar (substitute-in-file-name (concat ido-current-directory ido-text)))) 1962 (let ((evar (substitute-in-file-name (concat ido-current-directory ido-text))))
1960 (if (not (file-exists-p (file-name-directory evar))) 1963 (if (not (file-exists-p (file-name-directory evar)))
1961 (message "Expansion generates non-existing directory") 1964 (message "Expansion generates non-existing directory name")
1962 (if (file-directory-p evar) 1965 (if (file-directory-p evar)
1963 (ido-set-current-directory evar) 1966 (ido-set-current-directory evar)
1964 (let ((d (or (file-name-directory evar) "/")) 1967 (let ((d (or (file-name-directory evar) "/"))
1965 (f (file-name-nondirectory evar))) 1968 (f (file-name-nondirectory evar)))
1966 (when (file-directory-p d) 1969 (when (file-directory-p d)