comparison lisp/emulation/viper.el @ 68481:52b6d55ff868

Revision: emacs@sv.gnu.org/emacs--devo--0--patch-27 Creator: Michael Olson <mwolson@gnu.org> Merge ERC-related Viper hacks into Viper.
author Miles Bader <miles@gnu.org>
date Mon, 30 Jan 2006 03:16:50 +0000
parents e1bb7e4a4413
children 067115a6e738 7432ca837c8d
comparison
equal deleted inserted replaced
68480:a0bef9d6fe54 68481:52b6d55ff868
456 456
457 (defcustom viper-insert-state-mode-list 457 (defcustom viper-insert-state-mode-list
458 '(internal-ange-ftp-mode 458 '(internal-ange-ftp-mode
459 comint-mode 459 comint-mode
460 inferior-emacs-lisp-mode 460 inferior-emacs-lisp-mode
461 erc-mode
461 eshell-mode 462 eshell-mode
462 shell-mode) 463 shell-mode)
463 "*A list of major modes that should come up in Vi Insert state." 464 "*A list of major modes that should come up in Vi Insert state."
464 :type '(repeat symbol) 465 :type '(repeat symbol)
465 :group 'viper-misc) 466 :group 'viper-misc)
492 (mh-folder-mode emacs-state viper-slash-and-colon-map) 493 (mh-folder-mode emacs-state viper-slash-and-colon-map)
493 (gnus-group-mode emacs-state viper-gnus-modifier-map) 494 (gnus-group-mode emacs-state viper-gnus-modifier-map)
494 (gnus-summary-mode emacs-state viper-gnus-modifier-map) 495 (gnus-summary-mode emacs-state viper-gnus-modifier-map)
495 (Info-mode emacs-state viper-slash-and-colon-map) 496 (Info-mode emacs-state viper-slash-and-colon-map)
496 (Buffer-menu-mode emacs-state viper-slash-and-colon-map) 497 (Buffer-menu-mode emacs-state viper-slash-and-colon-map)
498 (erc-mode insert-state viper-comint-mode-modifier-map)
499 (erc-mode vi-state viper-comint-mode-modifier-map)
497 ) 500 )
498 "List specifying how to modify the various major modes to enable some Viperisms. 501 "List specifying how to modify the various major modes to enable some Viperisms.
499 The list has the structure: ((mode viper-state keymap) (mode viper-state 502 The list has the structure: ((mode viper-state keymap) (mode viper-state
500 keymap) ...). If `mode' is on the list, the `kemap' will be made active (on 503 keymap) ...). If `mode' is on the list, the `kemap' will be made active (on
501 the minor-mode-map-alist) in the specified viper state. 504 the minor-mode-map-alist) in the specified viper state.
766 ) 769 )
767 770
768 ;; remove all hooks set by viper 771 ;; remove all hooks set by viper
769 (mapatoms 'viper-remove-hooks) 772 (mapatoms 'viper-remove-hooks)
770 (remove-hook 'comint-mode-hook 'viper-comint-mode-hook) 773 (remove-hook 'comint-mode-hook 'viper-comint-mode-hook)
774 (remove-hook 'erc-mode-hook 'viper-comint-mode-hook)
771 (remove-hook 'minibuffer-setup-hook 'viper-minibuffer-setup-sentinel) 775 (remove-hook 'minibuffer-setup-hook 'viper-minibuffer-setup-sentinel)
772 (remove-hook 'change-major-mode-hook 'viper-major-mode-change-sentinel) 776 (remove-hook 'change-major-mode-hook 'viper-major-mode-change-sentinel)
773 (remove-hook 'post-command-hook 'viper-minibuffer-post-command-hook) 777 (remove-hook 'post-command-hook 'viper-minibuffer-post-command-hook)
774 778
775 ;; unbind Viper mouse bindings 779 ;; unbind Viper mouse bindings
911 (add-to-ordered-list 'emulation-mode-map-alists 'viper--key-maps 500) 915 (add-to-ordered-list 'emulation-mode-map-alists 'viper--key-maps 500)
912 ) 916 )
913 917
914 ;; Emacs shell, ange-ftp, and comint-based modes 918 ;; Emacs shell, ange-ftp, and comint-based modes
915 (add-hook 'comint-mode-hook 'viper-comint-mode-hook) ; comint 919 (add-hook 'comint-mode-hook 'viper-comint-mode-hook) ; comint
920 (add-hook 'erc-mode-hook 'viper-comint-mode-hook) ; ERC
916 921
917 (add-hook 'eshell-mode-hook 922 (add-hook 'eshell-mode-hook
918 (lambda () (setq viper-auto-indent nil))) 923 (lambda () (setq viper-auto-indent nil)))
919 924
920 (viper-set-emacs-state-searchstyle-macros nil 'dired-mode) ; dired 925 (viper-set-emacs-state-searchstyle-macros nil 'dired-mode) ; dired