Function: mouse-avoidance-random-shape
mouse-avoidance-random-shape is a byte-compiled function defined in
avoid.el.gz.
Signature
(mouse-avoidance-random-shape)
Documentation
Return a random cursor shape.
This assumes that any variable whose name begins with x-pointer- and has an integer value is a valid cursor shape. You might want to redefine this function to suit your own tastes.
Source Code
;; Defined in /usr/src/emacs/lisp/avoid.el.gz
(defvar x-pointer-invisible) ; silence byte-compiler
(defun mouse-avoidance-random-shape ()
"Return a random cursor shape.
This assumes that any variable whose name begins with x-pointer- and
has an integer value is a valid cursor shape. You might want to
redefine this function to suit your own tastes."
(if (null mouse-avoidance-pointer-shapes)
(progn
(dolist (i (all-completions "x-pointer-" obarray
(lambda (x)
(and (boundp x)
(integerp (symbol-value x))))))
(ignore-errors
(let ((value (symbol-value (intern i))))
(when (< value x-pointer-invisible)
(push value mouse-avoidance-pointer-shapes)))))))
(seq-random-elt mouse-avoidance-pointer-shapes))