aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2007-12-04 03:46:45 +0000
committerGlenn Morris2007-12-04 03:46:45 +0000
commitcbfcb1d0f11b41723add0302748f2a468e67f957 (patch)
tree7887f9b13f234f034846f508917544874dd9a0d8
parentcffe49096c0ad784de45d58602b7f52f6d67ffe0 (diff)
downloademacs-cbfcb1d0f11b41723add0302748f2a468e67f957.tar.gz
emacs-cbfcb1d0f11b41723add0302748f2a468e67f957.zip
(viper-replace-overlay-cursor-color)
(viper-insert-state-cursor-color, viper-emacs-state-cursor-color) (viper-vi-state-cursor-color): Consolidate make-variable-frame-local calls.
-rw-r--r--lisp/emulation/viper-init.el14
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el
index 666c22f961f..539a561bb5b 100644
--- a/lisp/emulation/viper-init.el
+++ b/lisp/emulation/viper-init.el
@@ -427,15 +427,11 @@ delete the text being replaced, as in standard Vi."
427 "*Cursor color when Viper is in Replace state." 427 "*Cursor color when Viper is in Replace state."
428 :type 'string 428 :type 'string
429 :group 'viper) 429 :group 'viper)
430(if (fboundp 'make-variable-frame-local)
431 (make-variable-frame-local 'viper-replace-overlay-cursor-color))
432 430
433(defcustom viper-insert-state-cursor-color "Green" 431(defcustom viper-insert-state-cursor-color "Green"
434 "Cursor color when Viper is in insert state." 432 "Cursor color when Viper is in insert state."
435 :type 'string 433 :type 'string
436 :group 'viper) 434 :group 'viper)
437(if (fboundp 'make-variable-frame-local)
438 (make-variable-frame-local 'viper-insert-state-cursor-color))
439 435
440;; viper-emacs-state-cursor-color doesn't work well. Causes cursor colors to be 436;; viper-emacs-state-cursor-color doesn't work well. Causes cursor colors to be
441;; confused in some cases. So, this var is nulled for now. 437;; confused in some cases. So, this var is nulled for now.
@@ -444,13 +440,17 @@ delete the text being replaced, as in standard Vi."
444 "Cursor color when Viper is in Emacs state." 440 "Cursor color when Viper is in Emacs state."
445 :type 'string 441 :type 'string
446 :group 'viper) 442 :group 'viper)
447(if (fboundp 'make-variable-frame-local)
448 (make-variable-frame-local 'viper-emacs-state-cursor-color))
449 443
450;; internal var, used to remember the default cursor color of emacs frames 444;; internal var, used to remember the default cursor color of emacs frames
451(defvar viper-vi-state-cursor-color nil) 445(defvar viper-vi-state-cursor-color nil)
446
452(if (fboundp 'make-variable-frame-local) 447(if (fboundp 'make-variable-frame-local)
453 (make-variable-frame-local 'viper-vi-state-cursor-color)) 448 (mapc 'make-variable-frame-local
449 '(viper-replace-overlay-cursor-color
450 viper-insert-state-cursor-color
451 viper-emacs-state-cursor-color
452 viper-vi-state-cursor-color)))
453
454 454
455(viper-deflocalvar viper-replace-overlay nil "") 455(viper-deflocalvar viper-replace-overlay nil "")
456(put 'viper-replace-overlay 'permanent-local t) 456(put 'viper-replace-overlay 'permanent-local t)