summaryrefslogtreecommitdiff
path: root/lisp/emulation/viper-init.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emulation/viper-init.el')
-rw-r--r--lisp/emulation/viper-init.el19
1 files changed, 10 insertions, 9 deletions
diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el
index 1b1e07a0a0c..539a561bb5b 100644
--- a/lisp/emulation/viper-init.el
+++ b/lisp/emulation/viper-init.el
@@ -26,8 +26,6 @@
;;; Code:
-(provide 'viper-init)
-
;; compiler pacifier
(defvar mark-even-if-inactive)
(defvar quail-mode)
@@ -429,15 +427,11 @@ delete the text being replaced, as in standard Vi."
"*Cursor color when Viper is in Replace state."
:type 'string
:group 'viper)
-(if (fboundp 'make-variable-frame-local)
- (make-variable-frame-local 'viper-replace-overlay-cursor-color))
(defcustom viper-insert-state-cursor-color "Green"
"Cursor color when Viper is in insert state."
:type 'string
:group 'viper)
-(if (fboundp 'make-variable-frame-local)
- (make-variable-frame-local 'viper-insert-state-cursor-color))
;; viper-emacs-state-cursor-color doesn't work well. Causes cursor colors to be
;; confused in some cases. So, this var is nulled for now.
@@ -446,13 +440,17 @@ delete the text being replaced, as in standard Vi."
"Cursor color when Viper is in Emacs state."
:type 'string
:group 'viper)
-(if (fboundp 'make-variable-frame-local)
- (make-variable-frame-local 'viper-emacs-state-cursor-color))
;; internal var, used to remember the default cursor color of emacs frames
(defvar viper-vi-state-cursor-color nil)
+
(if (fboundp 'make-variable-frame-local)
- (make-variable-frame-local 'viper-vi-state-cursor-color))
+ (mapc 'make-variable-frame-local
+ '(viper-replace-overlay-cursor-color
+ viper-insert-state-cursor-color
+ viper-emacs-state-cursor-color
+ viper-vi-state-cursor-color)))
+
(viper-deflocalvar viper-replace-overlay nil "")
(put 'viper-replace-overlay 'permanent-local t)
@@ -1025,6 +1023,9 @@ Should be set in `~/.viper' file."
(setq cursor-type '(bar . 2))))
+(provide 'viper-init)
+
+
;; Local Variables:
;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun)
;; End: