Function: evil-set-cursor

evil-set-cursor is a byte-compiled function defined in evil-common.el.

Signature

(evil-set-cursor SPECS)

Documentation

Change the cursor's apperance according to SPECS.

SPECS may be a cursor type as per cursor-type, a color string as passed to set-cursor-color, a zero-argument function for changing the cursor, or a list of the above.

If SPECS is nil, this function does not have an effect; pass (list nil) instead to indicate a nil cursor-type
(i.e., to disable the cursor).

Source Code

;; Defined in ~/.emacs.d/elpa/evil-20260728.1438/evil-common.el
;;; Display

(defun evil-set-cursor (specs)
  "Change the cursor's apperance according to SPECS.
SPECS may be a cursor type as per `cursor-type', a color
string as passed to `set-cursor-color', a zero-argument
function for changing the cursor, or a list of the above.

If SPECS is nil, this function does not have an effect;
pass (list nil) instead to indicate a nil `cursor-type'
\(i.e., to disable the cursor)."
  (unless (and (not (functionp specs))
               (listp specs)
               (null (cdr-safe (last specs))))
    (setq specs (list specs)))
  (dolist (spec specs)
    (cond
     ((functionp spec)
      (ignore-errors (funcall spec)))
     ((stringp spec)
      (evil-set-cursor-color spec))
     (t
      (setq cursor-type spec)))))