Function: viper-set-emacs-state-searchstyle-macros
viper-set-emacs-state-searchstyle-macros is an interactive and
byte-compiled function defined in viper-cmd.el.gz.
Signature
(viper-set-emacs-state-searchstyle-macros UNSET &optional ARG-MAJORMODE)
Documentation
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 ///.
With a prefix argument, this function unsets the macros.
If the optional prefix argument is non-nil and specifies a valid major mode,
this sets the macros only in the macros in that major mode. Otherwise,
the macros are set in the current major mode.
(When unsetting the macros, the second argument has no effect.)
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/emulation/viper-cmd.el.gz
(defun viper-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 `///'.
With a prefix argument, this function unsets the macros.
If the optional prefix argument is non-nil and specifies a valid major mode,
this sets the macros only in the macros in that major mode. Otherwise,
the macros are set in the current major mode.
\(When unsetting the macros, the second argument has no effect.)"
(interactive "P")
(or noninteractive
(if (not unset)
(progn
;; toggle case sensitivity in search
(viper-record-kbd-macro
"//" 'emacs-state
[1 (meta x) v i p e r - t o g g l e - s e a r c h - s t y l e return]
(or arg-majormode major-mode))
;; toggle regexp/vanilla search
(viper-record-kbd-macro
"///" 'emacs-state
[2 (meta x) v i p e r - t o g g l e - s e a r c h - s t y l e return]
(or arg-majormode major-mode))
(if (called-interactively-p 'interactive)
(message
"// and /// now toggle case-sensitivity and regexp search.")))
(viper-unrecord-kbd-macro "//" 'emacs-state)
(sit-for 2)
(viper-unrecord-kbd-macro "///" 'emacs-state))))