summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kifer <kifer@cs.stonybrook.edu>1997-07-18 18:55:36 +0000
committerMichael Kifer <kifer@cs.stonybrook.edu>1997-07-18 18:55:36 +0000
commitba66281f1d905b5f53202494139e0f25fba8c08c (patch)
tree34c85b6b60fe6dc771f79998390fdd4efc6f3373
parent194a7bd4776d75ebb6320df2c8442e4533c9db0c (diff)
downloademacs-ba66281f1d905b5f53202494139e0f25fba8c08c.tar.gz
new version
-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 `/'."
(setq msg "Search style remains unchanged")))
(princ msg t)))
-(defun vip-set-search-style-toggling-macros (unset)
+(defun vip-set-searchstyle-toggling-macros (unset)
"Set the macros for toggling the search style in Viper's vi-state.
The macro that toggles case sensitivity is bound to `//', and the one that
toggles regexp search is bound to `///'.
@@ -3233,7 +3233,7 @@ With a prefix argument, unsets the macro."
(vip-unrecord-kbd-macro "%%%" 'vi-state))))
-(defun vip-set-emacs-state-search-style-macros (unset &optional arg-majormode)
+(defun vip-set-emacs-state-searchstyle-macros (unset &optional arg-majormode)
"Set the macros for toggling the search style in Viper's emacs-state.
The macro that toggles case sensitivity is bound to `//', and the one that
toggles 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."
require-final-newline
(viper-standard-value
'require-final-newline viper-saved-non-viper-variables)
- mark-even-if-inactive
- (viper-standard-value
- 'mark-even-if-inactive viper-saved-non-viper-variables)
scroll-step
(viper-standard-value 'scroll-step viper-saved-non-viper-variables)
- global-mode-string
- (viper-standard-value 'global-mode-string viper-saved-non-viper-variables) )
-
- (setq-default
mode-line-buffer-identification
(viper-standard-value
- 'mode-line-buffer-identification viper-saved-non-viper-variables))
+ 'mode-line-buffer-identification viper-saved-non-viper-variables)
+ global-mode-string
+ (viper-standard-value 'global-mode-string viper-saved-non-viper-variables))
+
+ (if vip-emacs-p
+ (setq-default
+ mark-even-if-inactive
+ (viper-standard-value
+ 'mark-even-if-inactive viper-saved-non-viper-variables)))
;; Ideally, we would like to be able to de-localize local variables
(viper-delocalize-var 'minor-mode-map-alist)
@@ -737,26 +738,26 @@ remains buffer-local."
;; Dired
(vip-modify-major-mode 'dired-mode 'emacs-state vip-dired-modifier-map)
- (vip-set-emacs-state-search-style-macros nil 'dired-mode)
+ (vip-set-emacs-state-searchstyle-macros nil 'dired-mode)
(add-hook 'dired-mode-hook 'vip-change-state-to-emacs)
;; Tar
(vip-modify-major-mode 'tar-mode 'emacs-state vip-slash-and-colon-map)
- (vip-set-emacs-state-search-style-macros nil 'tar-mode)
+ (vip-set-emacs-state-searchstyle-macros nil 'tar-mode)
;; MH-E
(vip-modify-major-mode 'mh-folder-mode 'emacs-state vip-slash-and-colon-map)
- (vip-set-emacs-state-search-style-macros nil 'mh-folder-mode)
+ (vip-set-emacs-state-searchstyle-macros nil 'mh-folder-mode)
;; changing state to emacs is needed so the preceding will take hold
(add-hook 'mh-folder-mode-hook 'vip-change-state-to-emacs)
(add-hook 'mh-show-mode-hook 'viper-mode)
;; Gnus
(vip-modify-major-mode 'gnus-group-mode 'emacs-state vip-slash-and-colon-map)
- (vip-set-emacs-state-search-style-macros nil 'gnus-group-mode)
+ (vip-set-emacs-state-searchstyle-macros nil 'gnus-group-mode)
(vip-modify-major-mode
'gnus-summary-mode 'emacs-state vip-slash-and-colon-map)
- (vip-set-emacs-state-search-style-macros nil 'gnus-summary-mode)
+ (vip-set-emacs-state-searchstyle-macros nil 'gnus-summary-mode)
;; changing state to emacs is needed so the preceding will take hold
(add-hook 'gnus-group-mode-hook 'vip-change-state-to-emacs)
(add-hook 'gnus-summary-mode-hook 'vip-change-state-to-emacs)
@@ -764,7 +765,7 @@ remains buffer-local."
;; Info
(vip-modify-major-mode 'Info-mode 'emacs-state vip-slash-and-colon-map)
- (vip-set-emacs-state-search-style-macros nil 'Info-mode)
+ (vip-set-emacs-state-searchstyle-macros nil 'Info-mode)
;; Switching to emacs is needed so the above will take hold
(defadvice Info-mode (after vip-Info-ad activate)
"Switch to emacs mode."
@@ -773,7 +774,7 @@ remains buffer-local."
;; Buffer menu
(vip-modify-major-mode
'Buffer-menu-mode 'emacs-state vip-slash-and-colon-map)
- (vip-set-emacs-state-search-style-macros nil 'Buffer-menu-mode)
+ (vip-set-emacs-state-searchstyle-macros nil 'Buffer-menu-mode)
;; Switching to emacs is needed so the above will take hold
(defadvice Buffer-menu-mode (after vip-Buffer-menu-ad activate)
"Switch to emacs mode."
@@ -828,7 +829,8 @@ remains buffer-local."
(make-variable-buffer-local 'require-final-newline)
;; don't bark when mark is inactive
- (setq mark-even-if-inactive t)
+ (if vip-emacs-p
+ (setq mark-even-if-inactive t))
(setq scroll-step 1)
@@ -1028,11 +1030,12 @@ Also, the startup file name has been changed from .vip to .viper"))
(cons 'default-major-mode (list default-major-mode))
(cons 'next-line-add-newlines (list next-line-add-newlines))
(cons 'require-final-newline (list require-final-newline))
- (cons 'mark-even-if-inactive (list mark-even-if-inactive))
(cons 'scroll-step (list scroll-step))
(cons 'mode-line-buffer-identification
(list (default-value 'mode-line-buffer-identification)))
(cons 'global-mode-string (list global-mode-string))
+ (if vip-emacs-p
+ (cons 'mark-even-if-inactive (list mark-even-if-inactive)))
)))
@@ -1054,7 +1057,7 @@ Also, the startup file name has been changed from .vip to .viper"))
[(meta x) v i p - r e p e a t - f r o m - h i s t o r y return] 't)
;; set macros for toggling case sensitivity and regexp search
- (vip-set-search-style-toggling-macros nil)
+ (vip-set-searchstyle-toggling-macros nil)
;; Make %%% toggle parsing comments for matching parentheses
(vip-set-parsing-style-toggling-macro nil)
))