summaryrefslogtreecommitdiff
path: root/helm-lib.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2018-06-02 17:51:04 +0200
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2018-06-02 17:51:04 +0200
commitdfcc23b51fa76f0ba5fe430f2f7aad88b6dd78e2 (patch)
treec7dbaaef3633a0a0fd94b40c7eb9857513c3320b /helm-lib.el
parent72c914598194415dfa0563061b8e1803a807fcc4 (diff)
Improve docstring and don't quote strings in pcase
* helm-files.el (helm-delete-file): Do it. * helm-lib.el (helm-read-answer): Do it.
Diffstat (limited to 'helm-lib.el')
-rw-r--r--helm-lib.el17
1 files changed, 16 insertions, 1 deletions
diff --git a/helm-lib.el b/helm-lib.el
index b6bd35e6..c3c4821f 100644
--- a/helm-lib.el
+++ b/helm-lib.el
@@ -899,7 +899,22 @@ of this function is really needed."
Arg PROMPT is the prompt to present user the different possible
answers, ANSWER-LIST is a list of strings.
If user enter an answer which is one of ANSWER-LIST return this
-answer, otherwise keep prompting for a valid answer."
+answer, otherwise keep prompting for a valid answer.
+Note that answer should be a single char, only short answer are
+accepted.
+
+Example:
+
+ (let ((answer (helm-read-answer
+ \"answer [y,n,!,q]: \"
+ '(\"y\" \"n\" \"!\" \"q\"))))
+ (pcase answer
+ (\"y\" \"yes\")
+ (\"n\" \"no\")
+ (\"!\" \"all\")
+ (\"q\" \"quit\")))
+
+"
(let ((answer))
(while (not (member
(setq answer