]> code.delx.au - gnu-emacs-elpa/blobdiff - spinner.el
Require cl-lib
[gnu-emacs-elpa] / spinner.el
index 1e5a73a6e2c1b17e0bd8b4fb26f02c1c0620f49f..0132bf718fa5fe6a6ebfed4d0d9e37e026fdd1aa 100644 (file)
@@ -4,6 +4,8 @@
 
 ;; Author: Artur Malabarba <bruce.connor.am@gmail.com>
 ;; Version: 1.0
+;; Package-Requires: ((cl-lib "0.5"))
+;; URL: https://github.com/Bruce-Connor/spinner.el
 ;; Keywords: processes mode-line
 
 ;; This program is free software; you can redistribute it and/or modify
 
 \f
 ;;; Code:
+(require 'cl-lib)
 
 (defconst spinner-types
   '((3-line-clock . ["┤" "┘" "┴" "└" "├" "┌" "┬" "┐"])
     (2-line-clock . ["┘" "└" "┌" "┐"])
+    (flipping-line . ["_" "\\" "|" "/"])
+    (rotating-line . ["-" "\\" "|" "/"])
     (progress-bar . ["[    ]" "[=   ]" "[==  ]" "[=== ]" "[====]" "[ ===]" "[  ==]" "[   =]"])
     (progress-bar-filled . ["|    |" "|█   |" "|██  |" "|███ |" "|████|" "| ███|" "|  ██|" "|   █|"])
     (vertical-breathing . ["▁" "▂" "▃" "▄" "▅" "▆" "▇" "█" "▇" "▆" "▅" "▄" "▃" "▂" "▁" " "])
@@ -134,7 +139,7 @@ is chosen as the spinner type."
 
   ;; Maybe add to mode-line.
   (unless (memq 'spinner--mode-line-construct mode-line-format)
-    (setq mode-line-format (copy-list mode-line-format))
+    (setq mode-line-format (cl-copy-list mode-line-format))
     (let ((cell (memq 'mode-line-buffer-identification mode-line-format)))
       (if cell
           (setcdr cell (cons 'spinner--mode-line-construct (cdr cell)))