Function: viper-save-cursor-color
viper-save-cursor-color is a byte-compiled function defined in
viper-util.el.gz.
Signature
(viper-save-cursor-color BEFORE-WHICH-MODE)
Source Code
;; Defined in /usr/src/emacs/lisp/emulation/viper-util.el.gz
;; By default, saves current frame cursor color before changing viper state
(defun viper-save-cursor-color (before-which-mode)
(if (and (viper-window-display-p) (display-color-p))
(let ((color (viper-get-cursor-color)))
(if (and (stringp color) (color-defined-p color)
;; there is something fishy in that the color is not saved if
;; it is the same as frames default cursor color. need to be
;; checked.
(not (string= color
(viper-frame-value
viper-replace-overlay-cursor-color))))
(modify-frame-parameters
(selected-frame)
(list
(cons
(cond ((eq before-which-mode 'before-replace-mode)
'viper-saved-cursor-color-in-replace-mode)
((eq before-which-mode 'before-emacs-mode)
'viper-saved-cursor-color-in-emacs-mode)
(t
'viper-saved-cursor-color-in-insert-mode))
color)))))))