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

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

[nongnu] elpa/lorem-ipsum 7268e111f9 25/30: Insert list beginning


From: ELPA Syncer
Subject: [nongnu] elpa/lorem-ipsum 7268e111f9 25/30: Insert list beginning
Date: Sun, 11 Dec 2022 20:59:23 -0500 (EST)

branch: elpa/lorem-ipsum
commit 7268e111f9d5b65d613247030ab5b5538d4f5280
Author: Johan Andersson <nilsjohanandersson@gmail.com>
Commit: Johan Andersson <nilsjohanandersson@gmail.com>

    Insert list beginning
---
 lorem-ipsum.el | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/lorem-ipsum.el b/lorem-ipsum.el
index 50eeb3a73a..d8a347a30c 100644
--- a/lorem-ipsum.el
+++ b/lorem-ipsum.el
@@ -197,13 +197,13 @@ If NUM is non-nil, insert NUM sentences."
 If NUM is non-nil, insert NUM list items."
   (interactive "p")
   (if (not num)(setq num 1))
-  (if (> num 0)
-      (progn
-       (let ((para (nth (random (length lorem-ipsum-text)) lorem-ipsum-text)))
-         (insert (concat lorem-ipsum-list-bullet
-                         (nth (random (length para)) para)
-                         lorem-ipsum-list-item-end)))
-       (lorem-ipsum-insert-list (- num 1)))
+  (when (> num 0)
+    (insert lorem-ipsum-list-beginning)
+    (dotimes (i num)
+      (let ((para (nth (random (length lorem-ipsum-text)) lorem-ipsum-text)))
+        (insert (concat lorem-ipsum-list-bullet
+                        (nth (random (length para)) para)
+                        lorem-ipsum-list-item-end))))
     (insert lorem-ipsum-list-end)))
 
 ;;;###autoload



reply via email to

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