;; Keywords: emulations
;; Author: Michael Kifer <kifer@cs.sunysb.edu>
-;; Copyright (C) 1994, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+;; Copyright (C) 1994, 95, 96, 97, 98, 99, 2000, 01 Free Software Foundation, Inc.
-(defconst viper-version "3.08 of October 31, 1999"
+(defconst viper-version "3.10 of March 3, 2001"
"The current version of Viper")
;; This file is part of GNU Emacs.
diff-mode
perl-mode
+ cperl-mode
javascript-mode
tcl-mode
python-mode
:group 'viper-misc)
(defcustom viper-insert-state-mode-list
- '(internal-ange-ftp-mode comint-mode shell-mode)
+ '(internal-ange-ftp-mode
+ comint-mode
+ eshell-mode
+ shell-mode)
"*A list of major modes that should come up in Vi Insert state."
:type '(repeat symbol)
:group 'viper-misc)
))
(viper-set-expert-level 'dont-change-unless)))
+ (if viper-xemacs-p
+ (make-variable-buffer-local 'bar-cursor))
+
(or (memq major-mode viper-emacs-state-mode-list) ; don't switch to Vi
(memq major-mode viper-insert-state-mode-list) ; don't switch
(viper-change-state-to-vi)))))
;; Ideally, we would like to be able to de-localize local variables
(viper-delocalize-var 'minor-mode-map-alist)
(viper-delocalize-var 'require-final-newline)
+ (if viper-xemacs-p (viper-delocalize-var 'bar-cursor))
;; deactivate all advices done by Viper.
(and (< viper-expert-level 5) (> viper-expert-level 0))))
(viper-set-hooks))
-;; Let all minor modes take effect after loading
-;; this may not be enough, so we also set default minor-mode-alist.
+;; Let all minor modes take effect after loading.
+;; This may not be enough, so we also set default minor-mode-alist.
;; Without setting the default, new buffers that come up in emacs mode have
;; minor-mode-map-alist = nil, unless we call viper-change-state-*
(if (and viper-mode (eq viper-current-state 'emacs-state))
(if (and viper-mode (memq major-mode viper-vi-state-mode-list))
(viper-mode))
+(if viper-mode
+ (setq initial-major-mode
+ `(lambda ()
+ (funcall (quote ,initial-major-mode))
+ (set-viper-state-in-major-mode))
+ ))
+
+
(run-hooks 'viper-load-hook) ; the last chance to change something