aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMichael Kifer1997-07-18 18:55:36 +0000
committerMichael Kifer1997-07-18 18:55:36 +0000
commit5489c3d3fd7f35d08f16cdce9da3fd58ee047d85 (patch)
tree65b52c4c342c293eb9f10d13411bb69590609523 /lisp
parentc21241654f763ce51f276c4c71708f3c80d3868e (diff)
downloademacs-5489c3d3fd7f35d08f16cdce9da3fd58ee047d85.tar.gz
emacs-5489c3d3fd7f35d08f16cdce9da3fd58ee047d85.zip
new version
Diffstat (limited to 'lisp')
-rw-r--r--lisp/emulation/viper-cmd.el4
-rw-r--r--lisp/emulation/viper.el39
2 files changed, 23 insertions, 20 deletions
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index a6a4eaeda34..d93b8f9b34d 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -3186,7 +3186,7 @@ the Emacs binding of `/'."
3186 (setq msg "Search style remains unchanged"))) 3186 (setq msg "Search style remains unchanged")))
3187 (princ msg t))) 3187 (princ msg t)))
3188 3188
3189(defun vip-set-search-style-toggling-macros (unset) 3189(defun vip-set-searchstyle-toggling-macros (unset)
3190 "Set the macros for toggling the search style in Viper's vi-state. 3190 "Set the macros for toggling the search style in Viper's vi-state.
3191The macro that toggles case sensitivity is bound to `//', and the one that 3191The macro that toggles case sensitivity is bound to `//', and the one that
3192toggles regexp search is bound to `///'. 3192toggles regexp search is bound to `///'.
@@ -3233,7 +3233,7 @@ With a prefix argument, unsets the macro."
3233 (vip-unrecord-kbd-macro "%%%" 'vi-state)))) 3233 (vip-unrecord-kbd-macro "%%%" 'vi-state))))
3234 3234
3235 3235
3236(defun vip-set-emacs-state-search-style-macros (unset &optional arg-majormode) 3236(defun vip-set-emacs-state-searchstyle-macros (unset &optional arg-majormode)
3237 "Set the macros for toggling the search style in Viper's emacs-state. 3237 "Set the macros for toggling the search style in Viper's emacs-state.
3238The macro that toggles case sensitivity is bound to `//', and the one that 3238The macro that toggles case sensitivity is bound to `//', and the one that
3239toggles regexp search is bound to `///'. 3239toggles regexp search is bound to `///'.
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el
index ec5b21407e5..b7c2cfab28c 100644
--- a/lisp/emulation/viper.el
+++ b/lisp/emulation/viper.el
@@ -502,18 +502,19 @@ remains buffer-local."
502 require-final-newline 502 require-final-newline
503 (viper-standard-value 503 (viper-standard-value
504 'require-final-newline viper-saved-non-viper-variables) 504 'require-final-newline viper-saved-non-viper-variables)
505 mark-even-if-inactive
506 (viper-standard-value
507 'mark-even-if-inactive viper-saved-non-viper-variables)
508 scroll-step 505 scroll-step
509 (viper-standard-value 'scroll-step viper-saved-non-viper-variables) 506 (viper-standard-value 'scroll-step viper-saved-non-viper-variables)
510 global-mode-string
511 (viper-standard-value 'global-mode-string viper-saved-non-viper-variables) )
512
513 (setq-default
514 mode-line-buffer-identification 507 mode-line-buffer-identification
515 (viper-standard-value 508 (viper-standard-value
516 'mode-line-buffer-identification viper-saved-non-viper-variables)) 509 'mode-line-buffer-identification viper-saved-non-viper-variables)
510 global-mode-string
511 (viper-standard-value 'global-mode-string viper-saved-non-viper-variables))
512
513 (if vip-emacs-p
514 (setq-default
515 mark-even-if-inactive
516 (viper-standard-value
517 'mark-even-if-inactive viper-saved-non-viper-variables)))
517 518
518 ;; Ideally, we would like to be able to de-localize local variables 519 ;; Ideally, we would like to be able to de-localize local variables
519 (viper-delocalize-var 'minor-mode-map-alist) 520 (viper-delocalize-var 'minor-mode-map-alist)
@@ -737,26 +738,26 @@ remains buffer-local."
737 738
738 ;; Dired 739 ;; Dired
739 (vip-modify-major-mode 'dired-mode 'emacs-state vip-dired-modifier-map) 740 (vip-modify-major-mode 'dired-mode 'emacs-state vip-dired-modifier-map)
740 (vip-set-emacs-state-search-style-macros nil 'dired-mode) 741 (vip-set-emacs-state-searchstyle-macros nil 'dired-mode)
741 (add-hook 'dired-mode-hook 'vip-change-state-to-emacs) 742 (add-hook 'dired-mode-hook 'vip-change-state-to-emacs)
742 743
743 ;; Tar 744 ;; Tar
744 (vip-modify-major-mode 'tar-mode 'emacs-state vip-slash-and-colon-map) 745 (vip-modify-major-mode 'tar-mode 'emacs-state vip-slash-and-colon-map)
745 (vip-set-emacs-state-search-style-macros nil 'tar-mode) 746 (vip-set-emacs-state-searchstyle-macros nil 'tar-mode)
746 747
747 ;; MH-E 748 ;; MH-E
748 (vip-modify-major-mode 'mh-folder-mode 'emacs-state vip-slash-and-colon-map) 749 (vip-modify-major-mode 'mh-folder-mode 'emacs-state vip-slash-and-colon-map)
749 (vip-set-emacs-state-search-style-macros nil 'mh-folder-mode) 750 (vip-set-emacs-state-searchstyle-macros nil 'mh-folder-mode)
750 ;; changing state to emacs is needed so the preceding will take hold 751 ;; changing state to emacs is needed so the preceding will take hold
751 (add-hook 'mh-folder-mode-hook 'vip-change-state-to-emacs) 752 (add-hook 'mh-folder-mode-hook 'vip-change-state-to-emacs)
752 (add-hook 'mh-show-mode-hook 'viper-mode) 753 (add-hook 'mh-show-mode-hook 'viper-mode)
753 754
754 ;; Gnus 755 ;; Gnus
755 (vip-modify-major-mode 'gnus-group-mode 'emacs-state vip-slash-and-colon-map) 756 (vip-modify-major-mode 'gnus-group-mode 'emacs-state vip-slash-and-colon-map)
756 (vip-set-emacs-state-search-style-macros nil 'gnus-group-mode) 757 (vip-set-emacs-state-searchstyle-macros nil 'gnus-group-mode)
757 (vip-modify-major-mode 758 (vip-modify-major-mode
758 'gnus-summary-mode 'emacs-state vip-slash-and-colon-map) 759 'gnus-summary-mode 'emacs-state vip-slash-and-colon-map)
759 (vip-set-emacs-state-search-style-macros nil 'gnus-summary-mode) 760 (vip-set-emacs-state-searchstyle-macros nil 'gnus-summary-mode)
760 ;; changing state to emacs is needed so the preceding will take hold 761 ;; changing state to emacs is needed so the preceding will take hold
761 (add-hook 'gnus-group-mode-hook 'vip-change-state-to-emacs) 762 (add-hook 'gnus-group-mode-hook 'vip-change-state-to-emacs)
762 (add-hook 'gnus-summary-mode-hook 'vip-change-state-to-emacs) 763 (add-hook 'gnus-summary-mode-hook 'vip-change-state-to-emacs)
@@ -764,7 +765,7 @@ remains buffer-local."
764 765
765 ;; Info 766 ;; Info
766 (vip-modify-major-mode 'Info-mode 'emacs-state vip-slash-and-colon-map) 767 (vip-modify-major-mode 'Info-mode 'emacs-state vip-slash-and-colon-map)
767 (vip-set-emacs-state-search-style-macros nil 'Info-mode) 768 (vip-set-emacs-state-searchstyle-macros nil 'Info-mode)
768 ;; Switching to emacs is needed so the above will take hold 769 ;; Switching to emacs is needed so the above will take hold
769 (defadvice Info-mode (after vip-Info-ad activate) 770 (defadvice Info-mode (after vip-Info-ad activate)
770 "Switch to emacs mode." 771 "Switch to emacs mode."
@@ -773,7 +774,7 @@ remains buffer-local."
773 ;; Buffer menu 774 ;; Buffer menu
774 (vip-modify-major-mode 775 (vip-modify-major-mode
775 'Buffer-menu-mode 'emacs-state vip-slash-and-colon-map) 776 'Buffer-menu-mode 'emacs-state vip-slash-and-colon-map)
776 (vip-set-emacs-state-search-style-macros nil 'Buffer-menu-mode) 777 (vip-set-emacs-state-searchstyle-macros nil 'Buffer-menu-mode)
777 ;; Switching to emacs is needed so the above will take hold 778 ;; Switching to emacs is needed so the above will take hold
778 (defadvice Buffer-menu-mode (after vip-Buffer-menu-ad activate) 779 (defadvice Buffer-menu-mode (after vip-Buffer-menu-ad activate)
779 "Switch to emacs mode." 780 "Switch to emacs mode."
@@ -828,7 +829,8 @@ remains buffer-local."
828 (make-variable-buffer-local 'require-final-newline) 829 (make-variable-buffer-local 'require-final-newline)
829 830
830 ;; don't bark when mark is inactive 831 ;; don't bark when mark is inactive
831 (setq mark-even-if-inactive t) 832 (if vip-emacs-p
833 (setq mark-even-if-inactive t))
832 834
833 (setq scroll-step 1) 835 (setq scroll-step 1)
834 836
@@ -1028,11 +1030,12 @@ Also, the startup file name has been changed from .vip to .viper"))
1028 (cons 'default-major-mode (list default-major-mode)) 1030 (cons 'default-major-mode (list default-major-mode))
1029 (cons 'next-line-add-newlines (list next-line-add-newlines)) 1031 (cons 'next-line-add-newlines (list next-line-add-newlines))
1030 (cons 'require-final-newline (list require-final-newline)) 1032 (cons 'require-final-newline (list require-final-newline))
1031 (cons 'mark-even-if-inactive (list mark-even-if-inactive))
1032 (cons 'scroll-step (list scroll-step)) 1033 (cons 'scroll-step (list scroll-step))
1033 (cons 'mode-line-buffer-identification 1034 (cons 'mode-line-buffer-identification
1034 (list (default-value 'mode-line-buffer-identification))) 1035 (list (default-value 'mode-line-buffer-identification)))
1035 (cons 'global-mode-string (list global-mode-string)) 1036 (cons 'global-mode-string (list global-mode-string))
1037 (if vip-emacs-p
1038 (cons 'mark-even-if-inactive (list mark-even-if-inactive)))
1036 ))) 1039 )))
1037 1040
1038 1041
@@ -1054,7 +1057,7 @@ Also, the startup file name has been changed from .vip to .viper"))
1054 [(meta x) v i p - r e p e a t - f r o m - h i s t o r y return] 't) 1057 [(meta x) v i p - r e p e a t - f r o m - h i s t o r y return] 't)
1055 1058
1056 ;; set macros for toggling case sensitivity and regexp search 1059 ;; set macros for toggling case sensitivity and regexp search
1057 (vip-set-search-style-toggling-macros nil) 1060 (vip-set-searchstyle-toggling-macros nil)
1058 ;; Make %%% toggle parsing comments for matching parentheses 1061 ;; Make %%% toggle parsing comments for matching parentheses
1059 (vip-set-parsing-style-toggling-macro nil) 1062 (vip-set-parsing-style-toggling-macro nil)
1060 )) 1063 ))