diff options
author | Michael Kifer <kifer@cs.stonybrook.edu> | 2005-07-10 18:46:24 +0000 |
---|---|---|
committer | Michael Kifer <kifer@cs.stonybrook.edu> | 2005-07-10 18:46:24 +0000 |
commit | 8ea74b0e4570fe6e3ee583b0655bf6137d82dc28 (patch) | |
tree | d1d6a6c3acdc71b8843ee590b05c4e4150567803 /lisp/emulation/viper.el | |
parent | 9a4183e9ea0b4b2d09629652ce3d2d02bff1e647 (diff) | |
download | emacs-8ea74b0e4570fe6e3ee583b0655bf6137d82dc28.tar.gz |
* viper-cmd.el (viper--key-maps): new variable.
(viper-normalize-minor-mode-map-alist): use viper--key-maps and
emulation-mode-map-alists.
(viper-envelop-ESC-key): use viper-subseq.
(viper-search-forward/backward/next): disable debug-on-error.
* viper-keym.el (viper-toggle-key,viper-quoted-insert-key,
viper-ESC-key): new defcustoms.
* viper-macs.el (ex-map-read-args): use viper-subseq.
* viper-util.el (viper-key-to-emacs-key): use viper-subseq.
(viper-subseq): copy of subseq from cl.el.
* viper.el (viper-go-away,viper-set-hooks): use
emulation-mode-map-alists, advise self-insert-command, add-minor-mode.
* viper-mous.el (viper-current-frame-saved): use defvar.
* viper-init.el: got rid of -face in face names.
* ediff-diff.el (ediff-extract-diffs,ediff-extract-diffs3):
Make it work with longlines mode
* ediff-mult.el (ediff-meta-mode-hook): new variable.
* ediff-ptch.el (ediff-file-name-sans-prefix): quote regexp.
* ediff-init: got rid of -face in face names.
Diffstat (limited to 'lisp/emulation/viper.el')
-rw-r--r-- | lisp/emulation/viper.el | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el index fe65cb69cbb..3a95fa26835 100644 --- a/lisp/emulation/viper.el +++ b/lisp/emulation/viper.el @@ -8,7 +8,7 @@ ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> ;; Keywords: emulations -(defconst viper-version "3.11.4 of February 19, 2005" +(defconst viper-version "3.11.5 of July 8, 2005" "The current version of Viper") ;; This file is part of GNU Emacs. @@ -320,6 +320,7 @@ ;; end pacifier (require 'viper-init) +(require 'viper-keym) ;; better be defined before Viper custom group. (defvar viper-custom-file-name (convert-standard-filename "~/.viper") @@ -691,6 +692,12 @@ remains buffer-local." (setq viper-mode nil) + (when (and (fboundp 'add-to-ordered-list) (boundp 'emulation-mode-map-alists)) + (setq emulation-mode-map-alists + (delq 'viper--intercept-key-maps + (delq 'viper--key-maps emulation-mode-map-alists)) + )) + (viper-delocalize-var 'viper-vi-minibuffer-minor-mode) (viper-delocalize-var 'viper-insert-minibuffer-minor-mode) (viper-delocalize-var 'viper-vi-intercept-minor-mode) @@ -874,9 +881,27 @@ remains buffer-local." "Switch to emacs state while reading password." (viper-change-state-to-emacs))) + (defadvice self-insert-command (around viper-self-insert-ad activate) + "Ignore all self-inserting keys in the vi-state." + (if (and (eq viper-current-state 'vi-state) (interactive-p)) + (beep 1) + ad-do-it + )) + + (when (and (fboundp 'add-to-ordered-list) (boundp 'emulation-mode-map-alists)) + ;; needs to be as early as possible + (add-to-ordered-list + 'emulation-mode-map-alists 'viper--intercept-key-maps 100) + ;; needs to be after cua-mode + (add-to-ordered-list 'emulation-mode-map-alists 'viper--key-maps 500) + ) + ;; Emacs shell, ange-ftp, and comint-based modes (add-hook 'comint-mode-hook 'viper-comint-mode-hook) ; comint + (add-hook 'eshell-mode-hook + (lambda () (setq viper-auto-indent nil))) + (viper-set-emacs-state-searchstyle-macros nil 'dired-mode) ; dired (viper-set-emacs-state-searchstyle-macros nil 'tar-mode) ; tar (viper-set-emacs-state-searchstyle-macros nil 'mh-folder-mode) ; mhe @@ -1058,6 +1083,14 @@ remains buffer-local." (define-key viper-insert-intercept-map "\C-x)" nil) (define-key viper-emacs-intercept-map "\C-x)" nil)) + (defadvice add-minor-mode (after + viper-advice-add-minor-mode + (toggle name &optional keymap after toggle-fun) + activate) + "Run viper-normalize-minor-mode-map-alist after adding a minor mode." + (viper-normalize-minor-mode-map-alist) + (setq-default minor-mode-map-alist minor-mode-map-alist)) + ;; catch frame switching event (if (viper-window-display-p) (if viper-xemacs-p |