Switch license to GPLv3 or later.
[bpt/emacs.git] / lisp / emulation / viper-keym.el
index 2af0a9b..086605d 100644 (file)
@@ -1,7 +1,7 @@
 ;;; viper-keym.el --- Viper keymaps
 
 ;; Copyright (C) 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2004,
-;;   2005 Free Software Foundation, Inc.
+;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
 
@@ -9,7 +9,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
@@ -144,7 +144,7 @@ viper-insert-basic-map.  Not recommended, except for novice users.")
   "Auxiliary map for global user-defined bindings in Emacs state.")
 
 (defvar  viper-emacs-kbd-map  (make-sparse-keymap)
-  "This keymap keeps Vi-style kbd macros for emacs mode.")
+  "This keymap keeps Vi-style kbd macros for Emacs mode.")
 
 (viper-deflocalvar viper-emacs-local-user-map  (make-sparse-keymap)
   "Auxiliary map for local user-defined bindings in Emacs state.")
@@ -160,10 +160,10 @@ viper-insert-basic-map.  Not recommended, except for novice users.")
 
 ;; Some important keys used in viper
 (defcustom viper-toggle-key [(control ?z)]  ; "\C-z"
-  "The key used to change states from emacs to Vi and back.
+  "The key used to change states from Emacs to Vi and back.
 In insert mode, this key also functions as Meta.
 
-Enter as a sexp. Examples: \"\\C-z\", [(control ?z)]."
+Enter as a sexp.  Examples: \"\\C-z\", [(control ?z)]."
   :type 'sexp
   :group 'viper
   :set (lambda (symbol value)
@@ -200,9 +200,10 @@ Enter as a sexp. Examples: \"\\C-z\", [(control ?z)]."
   :type 'string
   :group 'viper)
 
-(defcustom viper-ESC-key [(escape)]  ; "\e"
+(defcustom viper-ESC-key (if (viper-window-display-p) [(escape)] "\e")
   "Key used to ESC.
-Enter as a sexp. Examples: \"\\e\", [(escape)]."
+Enter as a sexp. Examples: \"\\e\", [(escape)].
+If running in a terminal, [(escape)] is not understood, so must use \"\\e\"."
   :type 'sexp
   :group 'viper
   :set (lambda (symbol value)
@@ -307,8 +308,6 @@ Enter as a sexp. Examples: \"\\e\", [(escape)]."
 (define-key viper-insert-basic-map "\C-d" 'viper-backward-indent)
 (define-key viper-insert-basic-map "\C-w" 'viper-delete-backward-word)
 (define-key viper-insert-basic-map "\C-t" 'viper-forward-indent)
-(define-key viper-insert-basic-map
-  (if viper-xemacs-p [(shift tab)] [S-tab]) 'viper-insert-tab)
 (define-key viper-insert-basic-map viper-quoted-insert-key 'quoted-insert)
 (define-key viper-insert-basic-map "\C-?" 'viper-del-backward-char-in-insert)
 (define-key viper-insert-basic-map [backspace] 'viper-del-backward-char-in-insert)