changeset 19891:f20c96ca3bc8

new version
author Michael Kifer <kifer@cs.stonybrook.edu>
date Fri, 12 Sep 1997 21:09:03 +0000
parents 7c3a2b987f89
children b3d4cde6e4c3
files lisp/emulation/viper-cmd.el lisp/emulation/viper-keym.el
diffstat 2 files changed, 20 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emulation/viper-cmd.el	Fri Sep 12 20:58:57 1997 +0000
+++ b/lisp/emulation/viper-cmd.el	Fri Sep 12 21:09:03 1997 +0000
@@ -347,31 +347,29 @@
 	       (not viper-want-emacs-keys-in-insert))
 		   
 	 (if viper-want-ctl-h-help
-	     (progn 
-	       (define-key viper-insert-basic-map [backspace] 'help-command)
-	       (define-key viper-replace-map [backspace] 'help-command)
-	       (define-key viper-insert-basic-map [(control h)] 'help-command)
-	       (define-key viper-replace-map [(control h)] 'help-command))
+	     (progn
+	       (define-key viper-insert-basic-map "\C-h" 'help-command)
+	       (define-key viper-replace-map "\C-h" 'help-command))
 	   (define-key viper-insert-basic-map 
-	     [backspace] 'viper-del-backward-char-in-insert)
+	     "\C-h" 'viper-del-backward-char-in-insert)
 	   (define-key viper-replace-map
-	     [backspace] 'viper-del-backward-char-in-replace)
-	   (define-key viper-insert-basic-map 
-	     [(control h)] 'viper-del-backward-char-in-insert)
-	   (define-key viper-replace-map
-	     [(control h)] 'viper-del-backward-char-in-replace)))
-		     
+	     "\C-h" 'viper-del-backward-char-in-replace))
+	 ;; In XEmacs, C-h overrides backspace, so we make sure it doesn't.
+	 (define-key viper-insert-basic-map
+	   [backspace] 'viper-del-backward-char-in-insert)
+	 (define-key viper-replace-map
+	   [backspace] 'viper-del-backward-char-in-replace)
+	 ) ; end insert/replace case
 	(t ; Vi state
 	 (setq viper-vi-diehard-minor-mode (not viper-want-emacs-keys-in-vi))
 	 (if viper-want-ctl-h-help
-	     (progn
-	       (define-key viper-vi-basic-map [backspace] 'help-command)
-	       (define-key viper-vi-basic-map [(control h)] 'help-command))
-	   (define-key viper-vi-basic-map [backspace] 'viper-backward-char)
-	   (define-key viper-vi-basic-map [(control h)] 'viper-backward-char)))
+	     (define-key viper-vi-basic-map "\C-h" 'help-command)
+	   (define-key viper-vi-basic-map "\C-h" 'viper-backward-char))
+	 ;; In XEmacs, C-h overrides backspace, so we make sure it doesn't.
+	 (define-key viper-vi-basic-map [backspace] 'viper-backward-char))
 	))
 	     
-    
+   
 ;; Normalizes minor-mode-map-alist by putting Viper keymaps first.
 ;; This ensures that Viper bindings are in effect, regardless of which minor
 ;; modes were turned on by the user or by other packages.
--- a/lisp/emulation/viper-keym.el	Fri Sep 12 20:58:57 1997 +0000
+++ b/lisp/emulation/viper-keym.el	Fri Sep 12 21:09:03 1997 +0000
@@ -83,8 +83,7 @@
   :group 'viper) 
 
 (defcustom viper-want-ctl-h-help nil
-  "*If t then C-h is bound to help-command in insert mode, if nil then it is
-bound to delete-backward-char."
+  "*If non-nil, C-h gets bound to help-command; otherwise, C-h gets the usual Vi bindings."
   :type 'boolean
   :group 'viper)
 
@@ -241,6 +240,7 @@
   (if viper-xemacs-p [(shift tab)] [S-tab]) 'viper-insert-tab)
 (define-key viper-insert-basic-map "\C-v" '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)
 (define-key viper-insert-basic-map "\C-\\" 'viper-alternate-Meta-key)
 (define-key viper-insert-basic-map viper-toggle-key 'viper-escape-to-vi)
 (define-key viper-insert-basic-map "\C-c\M-p"
@@ -254,6 +254,7 @@
 (define-key viper-replace-map "\C-j" 'viper-replace-state-carriage-return)
 (define-key viper-replace-map "\C-m" 'viper-replace-state-carriage-return)
 (define-key viper-replace-map "\C-?" 'viper-del-backward-char-in-replace)
+(define-key viper-replace-map [backspace] 'viper-del-backward-char-in-replace)
 
 
 
@@ -356,6 +357,7 @@
 (define-key viper-vi-basic-map "f" 'viper-find-char-forward)
 (define-key viper-vi-basic-map "g" 'viper-nil)
 (define-key viper-vi-basic-map "h" 'viper-backward-char)
+(define-key viper-vi-basic-map [backspace] 'viper-backward-char)
 (define-key viper-vi-basic-map "i" 'viper-insert)
 (define-key viper-vi-basic-map "j" 'viper-next-line)
 (define-key viper-vi-basic-map "k" 'viper-previous-line)