]> code.delx.au - gnu-emacs/blobdiff - lisp/emulation/viper-init.el
* lisp/simple.el (prog-mode-map): New var.
[gnu-emacs] / lisp / emulation / viper-init.el
index d1533b3a3112d0fca6d7b6a898d3aaf9f82c06a2..68f729e8b4349e202553cb95cac489e6c2d9a49c 100644 (file)
@@ -1,7 +1,7 @@
 ;;; viper-init.el --- some common definitions for Viper
 
 ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;;   2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
 
@@ -35,7 +35,6 @@
 (defvar default-input-method)
 (defvar describe-current-input-method-function)
 (defvar bar-cursor)
-(defvar default-cursor-type)
 (defvar cursor-type)
 ;; end pacifier
 
   :type 'boolean
   :tag "Is it Microsoft-made OS?"
   :group 'viper-misc)
-(defcustom viper-vms-os-p (memq system-type '(vax-vms axp-vms))
-  "Tells if Emacs is running under VMS."
-  :type 'boolean
-  :tag "Is it VMS?"
-  :group 'viper-misc)
 
 (defcustom viper-suppress-input-method-change-message nil
   "If t, the message notifying about changes in the input method is not displayed.
@@ -530,27 +524,10 @@ will make it hard to use Vi-style timeout macros."
   :type 'integer
   :group 'viper-misc)
 
-(defcustom viper-ESC-keyseq-timeout (if (viper-window-display-p)
-                                     0 viper-fast-keyseq-timeout)
-  "*Key sequence beginning with ESC and separated by no more than this many milliseconds is considered to be generated by a keyboard function key.
-Setting this too high may slow down switching from insert to vi state.  Setting
-this value too low will make it impossible to use function keys in insert mode
-on a dumb terminal."
-  :type 'integer
-  :group 'viper-misc)
-
-(defcustom viper-translate-all-ESC-keysequences (not (viper-window-display-p))
-  "Allow translation of all key sequences into commands.
-Normally, Viper lets Emacs translate only those ESC key sequences that are
-defined in the low-level key-translation-map or function-key-map, such as those
-emitted by the arrow and function keys. Other sequences, e.g., \\e/, are
-treated as ESC command followed by a `/'. This is done for people who type fast
-and tend to hit other characters right after they hit ESC. Other people like
-Emacs to translate ESC sequences all the time.
-The default is to translate all sequences only when using a dumb terminal.
-This permits you to use ESC as a meta key in insert mode."
-  :type 'boolean
-  :group 'viper-misc)
+;; This function determines if ESC key sequences are to be translated into
+;; commands.
+(defun viper-translate-all-ESC-keysequences ()
+  (not (viper-window-display-p)))
 
 ;; Modes and related variables
 
@@ -993,7 +970,7 @@ Should be set in `~/.viper' file."
   (condition-case nil
       (if (featurep 'xemacs)
          (set (make-local-variable 'bar-cursor) nil)
-       (setq cursor-type default-cursor-type))
+       (setq cursor-type (default-value 'cursor-type)))
     (error nil)))
 
 (defun viper-set-insert-cursor-type ()
@@ -1001,6 +978,15 @@ Should be set in `~/.viper' file."
       (set (make-local-variable 'bar-cursor) 2)
     (setq cursor-type '(bar . 2))))
 
+(defun viper-ESC-keyseq-timeout ()
+  "*Key sequence beginning with ESC and separated by no more than this many milliseconds is considered to be generated by a keyboard function key.
+Setting this too high may slow down switching from insert to vi state.  Setting
+this value too low will make it impossible to use function keys in insert mode
+on a dumb terminal."
+  (if (viper-window-display-p)
+      0 viper-fast-keyseq-timeout))
+
+
 
 (provide 'viper-init)