# HG changeset patch # User Glenn Morris # Date 1196740005 0 # Node ID 36d8fe7938ef195980ce564a48e1aca989ee752d # Parent 9b896bc40fa2f540503da192e73d72c43089b002 (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. diff -r 9b896bc40fa2 -r 36d8fe7938ef lisp/emulation/viper-init.el --- a/lisp/emulation/viper-init.el Mon Dec 03 22:04:33 2007 +0000 +++ b/lisp/emulation/viper-init.el Tue Dec 04 03:46:45 2007 +0000 @@ -427,15 +427,11 @@ "*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. @@ -444,13 +440,17 @@ "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)