From 3a653d681083d8d14d2d2437cb3f405dd7f07f04 Mon Sep 17 00:00:00 2001 From: Joseph Turner Date: Tue, 26 Sep 2023 18:01:27 -0700 Subject: [PATCH] Fix MUSTMATCH description in read-directory-name docstring * lisp/files.el (read-directory-name): Copy from read-file-name description, replacing "file" with "directory". --- lisp/files.el | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/lisp/files.el b/lisp/files.el index b72f141c0ee..c31cb13653e 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -817,8 +817,23 @@ non-empty string that was inserted by this function. If the user exits with an empty minibuffer, this function returns an empty string. (This can happen only if the user erased the pre-inserted contents or if `insert-default-directory' is nil.) -Fourth arg MUSTMATCH non-nil means require existing directory's name. - Non-nil and non-t means also require confirmation after completion. + +Fourth arg MUSTMATCH can take the following values: +- nil means that the user can exit with any input. +- t means that the user is not allowed to exit unless + the input is (or completes to) an existing directory. +- `confirm' means that the user can exit with any input, but she needs + to confirm her choice if the input is not an existing directory. +- `confirm-after-completion' means that the user can exit with any + input, but she needs to confirm her choice if she called + `minibuffer-complete' right before `minibuffer-complete-and-exit' + and the input is not an existing directory. +- a function, which will be called with the input as the + argument. If the function returns a non-nil value, the + minibuffer is exited with that argument as the value. +- anything else behaves like t except that typing RET does not exit if it + does non-null completion. + Fifth arg INITIAL specifies text to start with. DIR should be an absolute directory name. It defaults to the value of `default-directory'." -- 2.41.0