Function: spinner--type-to-frames
spinner--type-to-frames is a byte-compiled function defined in
spinner.el.
Signature
(spinner--type-to-frames TYPE)
Documentation
Return a vector of frames corresponding to TYPE.
The list of possible built-in spinner types is given by the
spinner-types variable, but you can also use your own (see
below).
If TYPE is nil, the frames of this spinner are given by the first
element of spinner-types.
If TYPE is a symbol, it specifies an element of spinner-types.
If TYPE is 'random, use a random element of spinner-types.
If TYPE is a list, it should be a list of symbols, and a random
one is chosen as the spinner type.
If TYPE is a vector, it should be a vector of strings and these
are used as the spinner's frames. This allows you to make your
own spinner animations.
Source Code
;; Defined in ~/.emacs.d/elpa/spinner-1.7.4/spinner.el
;;; The spinner object.
(defun spinner--type-to-frames (type)
"Return a vector of frames corresponding to TYPE.
The list of possible built-in spinner types is given by the
`spinner-types' variable, but you can also use your own (see
below).
If TYPE is nil, the frames of this spinner are given by the first
element of `spinner-types'.
If TYPE is a symbol, it specifies an element of `spinner-types'.
If TYPE is 'random, use a random element of `spinner-types'.
If TYPE is a list, it should be a list of symbols, and a random
one is chosen as the spinner type.
If TYPE is a vector, it should be a vector of strings and these
are used as the spinner's frames. This allows you to make your
own spinner animations."
(cond
((vectorp type) type)
((not type) (cdr (car spinner-types)))
((eq type 'random)
(cdr (elt spinner-types
(random (length spinner-types)))))
((listp type)
(cdr (assq (elt type (random (length type)))
spinner-types)))
((symbolp type) (cdr (assq type spinner-types)))
(t (error "Unknown spinner type: %s" type))))