emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/helm ea4c9cc61e 1/2: Fix helm-read-repeat-string prompt an


From: ELPA Syncer
Subject: [nongnu] elpa/helm ea4c9cc61e 1/2: Fix helm-read-repeat-string prompt and docstring
Date: Fri, 22 Sep 2023 10:00:56 -0400 (EDT)

branch: elpa/helm
commit ea4c9cc61e5d3d37c3338a627b6951e9e50a95e7
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>

    Fix helm-read-repeat-string prompt and docstring
---
 helm-utils.el | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/helm-utils.el b/helm-utils.el
index c0272d3291..4da0fde40d 100644
--- a/helm-utils.el
+++ b/helm-utils.el
@@ -1110,14 +1110,19 @@ Run `helm-find-many-files-after-hook' at end."
 
 (defun helm-read-repeat-string (prompt &optional count)
   "Prompt as many time PROMPT is not empty.
-If COUNT is non--nil add a number after each prompt."
-  (cl-loop with elm
-        while (not (string= elm ""))
-        for n from 1
-        do (when count
-             (setq prompt (concat prompt (int-to-string n) ": ")))
-        collect (setq elm (helm-read-string prompt)) into lis
-        finally return (remove "" lis)))
+If COUNT is non--nil add a number after each prompt.
+Return the list of strings entered in each prompt."
+  (cl-loop with prt = prompt
+           with elm
+           while (not (string= elm ""))
+           for n from 1
+           do (when count
+                (setq prt (format "%s (%s): "
+                                  (replace-regexp-in-string
+                                   ": " "" prompt)
+                                  (int-to-string n))))
+           collect (setq elm (helm-read-string prt)) into lis
+           finally return (remove "" lis)))
 
 (defun helm-html-bookmarks-to-alist (file url-regexp bmk-regexp)
   "Parse HTML bookmark FILE and return an alist with (title . url) as 
elements."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]