;;; viper-init.el --- some common definitions for Viper
-;; Copyright (C) 1997-2012 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2016 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
;; Package: viper
(declare (indent defun))
`(progn
(defvar ,var ,default-value
- ,(format "%s\n\(buffer local\)" documentation))
+ ,(format "%s\n(buffer local)" documentation))
(make-variable-buffer-local ',var)))
;; (viper-loop COUNT BODY) Execute BODY COUNT times.
viper-expert-level is 1 or 2 or when viper-want-emacs-keys-in-vi is t.
The minor mode viper-insert-diehard-minor-mode is in effect when
viper-expert-level is 1 or 2 or if viper-want-emacs-keys-in-insert is t.
-Use `M-x viper-set-expert-level' to change this.")
+Use `\\[viper-set-expert-level]' to change this.")
;; Max expert level supported by Viper. This is NOT a user option.
;; It is here to make it hard for the user from resetting it.
;; VI-style Undo
;; Used to 'undo' complex commands, such as replace and insert commands.
-(viper-deflocalvar viper-undo-needs-adjustment nil)
-(put 'viper-undo-needs-adjustment 'permanent-local t)
-
-;; A mark that Viper puts on buffer-undo-list. Marks the beginning of a
-;; complex command that must be undone atomically. If inserted, it is
-;; erased by viper-change-state-to-vi and viper-repeat.
-(defconst viper-buffer-undo-list-mark 'viper)
+(viper-deflocalvar viper-undo-in-complex-command nil)
+(put 'viper-undo-in-complex-command 'permanent-local t)
(defcustom viper-keep-point-on-undo nil
"Non-nil means not to move point while undoing commands.
;; (defcustom viper-emacs-state-cursor-color "Magenta"
(defcustom viper-emacs-state-cursor-color nil
"Cursor color when Viper is in Emacs state."
- :type 'string
+ :type '(choice (const nil) string)
:group 'viper)
;; internal var, used to remember the default cursor color of emacs frames
:type 'boolean
:group 'viper)
-(defcustom viper-read-buffer-function 'read-buffer
+(defcustom viper-read-buffer-function #'read-buffer
"Function to use for prompting the user for a buffer name."
:type 'symbol
:group 'viper)
(defcustom viper-keep-point-on-repeat t
"If t, don't move point when repeating previous command.
-This is useful for doing repeated changes with the '.' key.
+This is useful for doing repeated changes with the `.' key.
The user can change this to nil, if she likes when the cursor moves
to a new place after repeating previous Vi command."
:type 'boolean
the window will be scrolled up or down appropriately, to reveal context.
If you want Viper search to behave as usual in Vi, set this variable to a
negative number."
- :type 'boolean
+ :type 'integer
:group 'viper-search)
(defcustom viper-re-query-replace t
"^\\\\[sb][a-z]*{.*}\\s-*$\\|" ; latex
"^@node\\|@table\\|^@m?enu\\|^@itemize\\|^@if\\|" ; texinfo
"^.+:-") ; prolog
- "Regexps for Headings. Used by \[\[ and \]\].")
+ "Regexps for Headings. Used by [[ and ]].")
(defvar viper-heading-end
(concat "^}\\|" ; C/C++
"^@end \\|" ; texinfo
")\n\n[ \t\n]*\\|" ; lisp
"\\.\\s-*$") ; prolog
- "*Regexps to end Headings/Sections. Used by \[\].")
+ "*Regexps to end Headings/Sections. Used by [].")
;; These two vars control the interaction of jumps performed by ' and `.
(defcustom viper-vi-style-in-minibuffer t
"If t, use vi-style editing in minibuffer.
-Should be set in `~/.viper' file."
+Should be set in `viper-custom-file-name'."
:type 'boolean
:group 'viper)