diff options
author | Chong Yidong <cyd@gnu.org> | 2012-08-15 01:10:38 +0800 |
---|---|---|
committer | Chong Yidong <cyd@gnu.org> | 2012-08-15 01:10:38 +0800 |
commit | 4abcdac823a757bffc204f5eb074eb09ad69e58a (patch) | |
tree | 636778c2f514810defc0164b1d10d96970e1ab8b /lisp/minibuffer.el | |
parent | 55802e4a3dc1d6b1ffa05c193cdd94f9f69c1a41 (diff) | |
download | emacs-4abcdac823a757bffc204f5eb074eb09ad69e58a.tar.gz |
More doc fixes.
* lisp/minibuffer.el (read-file-name): Doc fix.
* character.c (Fcharacterp): Doc fix (Bug#12076).
* data.c (Findirect_variable): Doc fix (Bug#11040).
* editfns.c (Fsave_current_buffer): Doc fix (Bug#11542).
Fixes: debbugs:11542 debbugs:11040 debbugs:12076 debbugs:10881
Diffstat (limited to 'lisp/minibuffer.el')
-rw-r--r-- | lisp/minibuffer.el | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 5c2c14d1fdb..cc2638d58de 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -2259,14 +2259,24 @@ such as making the current buffer visit no file in the case of (defun read-file-name (prompt &optional dir default-filename mustmatch initial predicate) "Read file name, prompting with PROMPT and completing in directory DIR. Value is not expanded---you must call `expand-file-name' yourself. -Default name to DEFAULT-FILENAME if user exits the minibuffer with -the same non-empty string that was inserted by this function. - (If DEFAULT-FILENAME is omitted, the visited file name is used, - except that if INITIAL is specified, that combined with DIR is used. - If DEFAULT-FILENAME is a list of file names, the first file name is used.) -If the user exits with an empty minibuffer, this function returns -an empty string. (This can only happen if the user erased the -pre-inserted contents or if `insert-default-directory' is nil.) + +DIR is the directory to use for completing relative file names. +It should be an absolute directory name, or nil (which means the +current buffer's value of `default-directory'). + +DEFAULT-FILENAME specifies the default file name to return if the +user exits the minibuffer with the same non-empty string inserted +by this function. If DEFAULT-FILENAME is a string, that serves +as the default. If DEFAULT-FILENAME is a list of strings, the +first string is the default. If DEFAULT-FILENAME is omitted or +nil, then if INITIAL is non-nil, the default is DIR combined with +INITIAL; otherwise, if the current buffer is visiting a file, +that file serves as the default; otherwise, the default is simply +the string inserted into the minibuffer. + +If the user exits with an empty minibuffer, return an empty +string. (This happens only if the user erases the pre-inserted +contents, or if `insert-default-directory' is nil.) Fourth arg MUSTMATCH can take the following values: - nil means that the user can exit with any input. @@ -2283,10 +2293,10 @@ Fourth arg MUSTMATCH can take the following values: Fifth arg INITIAL specifies text to start with. -If optional sixth arg PREDICATE is non-nil, possible completions and -the resulting file name must satisfy (funcall PREDICATE NAME). -DIR should be an absolute directory name. It defaults to the value of -`default-directory'. +Sixth arg PREDICATE, if non-nil, should be a function of one +argument; then a file name is considered an acceptable completion +alternative only if PREDICATE returns non-nil with the file name +as its argument. If this command was invoked with the mouse, use a graphical file dialog if `use-dialog-box' is non-nil, and the window system or X |