summaryrefslogtreecommitdiff
path: root/helm-bbdb.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2012-07-05 11:26:32 +0200
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2012-07-05 11:26:32 +0200
commit94a281a831c29d2d31059c9e1839d72965fb29f1 (patch)
tree9b97da4ec49c3ca080967ddb58bdcf8fc1d23d11 /helm-bbdb.el
parent9d1995650f5e48083bfe1df5340b99d98aa47452 (diff)
* helm-bbdb.el (helm-read-repeat-string): Oops, forget to update last definition.
Diffstat (limited to 'helm-bbdb.el')
-rw-r--r--helm-bbdb.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/helm-bbdb.el b/helm-bbdb.el
index 31b193fa..ebc76f54 100644
--- a/helm-bbdb.el
+++ b/helm-bbdb.el
@@ -52,10 +52,13 @@ See docstring of `bbdb-create-internal' for more info on phone entries."
finally return (remove "" lis)))
;; TODO move this to helm-utils when finish
-(defun helm-read-repeat-string (prompt)
+(defun helm-read-repeat-string (prompt &optional count)
"Prompt as many time PROMPT is not empty."
- (loop with elm while (not (string= elm ""))
- collect (setq elm (read-string prompt)) into lis
+ (loop with elm with new-prompt = prompt
+ while (not (string= elm ""))
+ for n from 1
+ do (when count (setq new-prompt (concat prompt (int-to-string n) ": ")))
+ collect (setq elm (read-string new-prompt)) into lis
finally return (remove "" lis)))
(defun helm-bbdb-read-address ()