[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 46c545b 04/10: spinner: Iron out some kinks in the minor-m
From: |
Artur Malabarba |
Subject: |
[elpa] master 46c545b 04/10: spinner: Iron out some kinks in the minor-mode behavior |
Date: |
Tue, 11 Aug 2015 10:56:35 +0000 |
branch: master
commit 46c545bf532f3798a0e73ff42705ddaafa9deac6
Author: Artur Malabarba <address@hidden>
Commit: Artur Malabarba <address@hidden>
spinner: Iron out some kinks in the minor-mode behavior
---
spinner.el | 26 +++++++++++++++-----------
1 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/spinner.el b/spinner.el
index 47dad2b..f81fa29 100644
--- a/spinner.el
+++ b/spinner.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2015 Free Software Foundation, Inc.
;; Author: Artur Malabarba <address@hidden>
-;; Version: 1.2
+;; Version: 1.2.1
;; Package-Requires: ((cl-lib "0.5"))
;; URL: https://github.com/Malabarba/spinner.el
;; Keywords: processes mode-line
@@ -120,16 +120,20 @@ vector, the spinner itself.")
"Make a mode-line spinner construct, using symbol SPINNER-VAR.
SPINNER-VAR is the name of the variable holding the spinner type
to be used (one of the cdr's in `spinner-types'). To st"
- `((,spinner-var
- (" "
- (:eval (elt ,spinner-var
- (% spinner--counter
- (length ,spinner-var)))))
- (,timer-var
- (:eval (spinner-stop ,spinner-var ,timer-var))))))
+ `(,spinner-var
+ (:eval (elt ,spinner-var
+ (% spinner--counter
+ (length ,spinner-var))))
+ (,timer-var
+ (:eval (spinner-stop ',spinner-var ',timer-var)))))
(defconst spinner--mode-line-construct
- (spinner-make-construct 'spinner-current 'spinner--timer)
+ '(spinner-current
+ (" " (:eval (elt spinner-current
+ (% spinner--counter
+ (length spinner-current)))))
+ (spinner--timer
+ (:eval (spinner-stop 'spinner-current 'spinner--timer))))
"Construct used to display the spinner.")
(put 'spinner--mode-line-construct 'risky-local-variable t)
@@ -143,7 +147,7 @@ Applications can override this value.")
;;; The main functions
-(defun spinner-start-timer (fps spinner-var timer-var)
+(defun spinner-start-timer (spinner-var timer-var &optional fps)
"Start a spinner timer at FPS frames per second.
SPINNER-VAR is the name of the variable holding the spinner type,
and TIMER-VAR is the name of the variable that will be used to
@@ -217,7 +221,7 @@ is chosen as the spinner type."
'spinner--mode-line-construct)))
;; Create timer.
- (spinner-start-timer fps 'spinner-current 'spinner--timer))
+ (spinner-start-timer 'spinner-current 'spinner--timer fps))
(defun spinner-stop (&optional spinner-var timer-var)
"Stop the current buffer's spinner."
- [elpa] master updated (7695b59 -> 25a84ed), Artur Malabarba, 2015/08/11
- [elpa] master fb3fb96 01/10: 1.2, Artur Malabarba, 2015/08/11
- [elpa] master 7d222f4 02/10: spinner: Generalize to arbitrary variables, Artur Malabarba, 2015/08/11
- [elpa] master 59ef469 06/10: Implement spinner-start-print, Artur Malabarba, 2015/08/11
- [elpa] master 46c545b 04/10: spinner: Iron out some kinks in the minor-mode behavior,
Artur Malabarba <=
- [elpa] master 709295d 07/10: * spinner: Rename constructor., Artur Malabarba, 2015/08/11
- [elpa] master 8d8c459 09/10: spinner: More doc, Artur Malabarba, 2015/08/11
- [elpa] master bd2c557 08/10: spinner: Add delay feature, Artur Malabarba, 2015/08/11
- [elpa] master b6dc924 03/10: spinner: Document new functionality, Artur Malabarba, 2015/08/11
- [elpa] master 60205a4 05/10: Rewrite spinners completely., Artur Malabarba, 2015/08/11
- [elpa] master 25a84ed 10/10: Merge commit '8d8c459d7757cf5774f11be9147d7a54f5f9bbd7', Artur Malabarba, 2015/08/11