summaryrefslogtreecommitdiff
path: root/lisp/emulation
diff options
context:
space:
mode:
authorMichael Kifer <kifer@cs.stonybrook.edu>1997-09-12 21:09:03 +0000
committerMichael Kifer <kifer@cs.stonybrook.edu>1997-09-12 21:09:03 +0000
commit5ce0578820e5ee55fe21491213c21f75909b904f (patch)
tree6672cf2cff523f2bea36908dcd956e2c1435308e /lisp/emulation
parentd6efd584a04e74f6ee032d1d9ddf31a99caf3cba (diff)
downloademacs-5ce0578820e5ee55fe21491213c21f75909b904f.tar.gz
new version
Diffstat (limited to 'lisp/emulation')
-rw-r--r--lisp/emulation/viper-cmd.el34
-rw-r--r--lisp/emulation/viper-keym.el6
2 files changed, 20 insertions, 20 deletions
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index 85eb264a208..33e6e685f34 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -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))
- (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)
+ (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
- [(control h)] 'viper-del-backward-char-in-insert)
+ "\C-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.
diff --git a/lisp/emulation/viper-keym.el b/lisp/emulation/viper-keym.el
index 3da13594e0d..961a7d1a1cc 100644
--- a/lisp/emulation/viper-keym.el
+++ b/lisp/emulation/viper-keym.el
@@ -83,8 +83,7 @@ as is allowed by the major mode in effect."
: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 @@ viper-insert-basic-map. Not recommended, except for novice users.")
(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 @@ viper-insert-basic-map. Not recommended, except for novice users.")
(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 @@ viper-insert-basic-map. Not recommended, except for novice users.")
(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)