Mercurial > emacs
comparison lisp/emulation/viper-cmd.el @ 19891:f20c96ca3bc8
new version
author | Michael Kifer <kifer@cs.stonybrook.edu> |
---|---|
date | Fri, 12 Sep 1997 21:09:03 +0000 |
parents | 22c1e47f66e1 |
children | 9a4cdbf423ea |
comparison
equal
deleted
inserted
replaced
19890:7c3a2b987f89 | 19891:f20c96ca3bc8 |
---|---|
345 | 345 |
346 (setq viper-insert-diehard-minor-mode | 346 (setq viper-insert-diehard-minor-mode |
347 (not viper-want-emacs-keys-in-insert)) | 347 (not viper-want-emacs-keys-in-insert)) |
348 | 348 |
349 (if viper-want-ctl-h-help | 349 (if viper-want-ctl-h-help |
350 (progn | 350 (progn |
351 (define-key viper-insert-basic-map [backspace] 'help-command) | 351 (define-key viper-insert-basic-map "\C-h" 'help-command) |
352 (define-key viper-replace-map [backspace] 'help-command) | 352 (define-key viper-replace-map "\C-h" 'help-command)) |
353 (define-key viper-insert-basic-map [(control h)] 'help-command) | |
354 (define-key viper-replace-map [(control h)] 'help-command)) | |
355 (define-key viper-insert-basic-map | 353 (define-key viper-insert-basic-map |
356 [backspace] 'viper-del-backward-char-in-insert) | 354 "\C-h" 'viper-del-backward-char-in-insert) |
357 (define-key viper-replace-map | 355 (define-key viper-replace-map |
358 [backspace] 'viper-del-backward-char-in-replace) | 356 "\C-h" 'viper-del-backward-char-in-replace)) |
359 (define-key viper-insert-basic-map | 357 ;; In XEmacs, C-h overrides backspace, so we make sure it doesn't. |
360 [(control h)] 'viper-del-backward-char-in-insert) | 358 (define-key viper-insert-basic-map |
361 (define-key viper-replace-map | 359 [backspace] 'viper-del-backward-char-in-insert) |
362 [(control h)] 'viper-del-backward-char-in-replace))) | 360 (define-key viper-replace-map |
363 | 361 [backspace] 'viper-del-backward-char-in-replace) |
362 ) ; end insert/replace case | |
364 (t ; Vi state | 363 (t ; Vi state |
365 (setq viper-vi-diehard-minor-mode (not viper-want-emacs-keys-in-vi)) | 364 (setq viper-vi-diehard-minor-mode (not viper-want-emacs-keys-in-vi)) |
366 (if viper-want-ctl-h-help | 365 (if viper-want-ctl-h-help |
367 (progn | 366 (define-key viper-vi-basic-map "\C-h" 'help-command) |
368 (define-key viper-vi-basic-map [backspace] 'help-command) | 367 (define-key viper-vi-basic-map "\C-h" 'viper-backward-char)) |
369 (define-key viper-vi-basic-map [(control h)] 'help-command)) | 368 ;; In XEmacs, C-h overrides backspace, so we make sure it doesn't. |
370 (define-key viper-vi-basic-map [backspace] 'viper-backward-char) | 369 (define-key viper-vi-basic-map [backspace] 'viper-backward-char)) |
371 (define-key viper-vi-basic-map [(control h)] 'viper-backward-char))) | |
372 )) | 370 )) |
373 | 371 |
374 | 372 |
375 ;; Normalizes minor-mode-map-alist by putting Viper keymaps first. | 373 ;; Normalizes minor-mode-map-alist by putting Viper keymaps first. |
376 ;; This ensures that Viper bindings are in effect, regardless of which minor | 374 ;; This ensures that Viper bindings are in effect, regardless of which minor |
377 ;; modes were turned on by the user or by other packages. | 375 ;; modes were turned on by the user or by other packages. |
378 (defun viper-normalize-minor-mode-map-alist () | 376 (defun viper-normalize-minor-mode-map-alist () |
379 (setq minor-mode-map-alist | 377 (setq minor-mode-map-alist |