[Top][All Lists]

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

[elpa] master 59ef469 06/10: Implement spinner-start-print

From: Artur Malabarba
Subject: [elpa] master 59ef469 06/10: Implement spinner-start-print
Date: Tue, 11 Aug 2015 10:56:36 +0000

branch: master
commit 59ef4695030bb43a43611183239605f7e2eb48f4
Author: Artur Malabarba <address@hidden>
Commit: Artur Malabarba <address@hidden>

    Implement spinner-start-print
 spinner.el |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/spinner.el b/spinner.el
index 34427b2..05f6707 100644
--- a/spinner.el
+++ b/spinner.el
@@ -280,6 +280,12 @@ Default is `spinner-frames-per-second'."
   (when fps (setf (spinner--fps type-or-object) fps))
   (spinner--start-timer type-or-object))
+(defun spinner-start-print (spinner)
+  "Like `spinner-print', but also start SPINNER if it's not active."
+  (unless (spinner--active-p spinner)
+    (spinner-start spinner))
+  (spinner-print spinner))
 (defun spinner-stop (&optional spinner)
   "Stop the current buffer's spinner."
   (let* ((spinner (or spinner spinner-current))

reply via email to

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