summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2021-01-31 14:10:10 +0100
committerStefan Kangas <stefan@marxist.se>2021-01-31 14:11:11 +0100
commitd7405e474b43ba5c4238cc27f2aaa61341b828b4 (patch)
tree3c67d93020fd6a2ed0b64460e48893738a173e43
parent686caed4af6e92ae908f482151fa3da87aeab8ec (diff)
downloademacs-d7405e474b43ba5c4238cc27f2aaa61341b828b4.tar.gz
Obsolete viper-deflocalvar for defvar-local
* lisp/emulation/viper-init.el (viper-deflocalvar): Make obsolete. Use defvar-local. * lisp/emulation/viper-cmd.el (viper--undo-change-group-handle): * lisp/emulation/viper-init.el (viper-vi-intercept-minor-mode) (viper-vi-basic-minor-mode, viper-vi-local-user-minor-mode) (viper-vi-global-user-minor-mode) (viper-vi-state-modifier-minor-mode) (viper-vi-diehard-minor-mode, viper-vi-kbd-minor-mode) (viper-insert-intercept-minor-mode) (viper-insert-basic-minor-mode) (viper-insert-local-user-minor-mode) (viper-insert-global-user-minor-mode) (viper-insert-state-modifier-minor-mode) (viper-insert-diehard-minor-mode, viper-insert-kbd-minor-mode) (viper-replace-minor-mode, viper-emacs-intercept-minor-mode) (viper-emacs-local-user-minor-mode) (viper-emacs-global-user-minor-mode, viper-emacs-kbd-minor-mode) (viper-emacs-state-modifier-minor-mode) (viper-vi-minibuffer-minor-mode) (viper-insert-minibuffer-minor-mode) (viper-automatic-iso-accents, viper-special-input-method) (viper-intermediate-command, viper-began-as-replace) (viper-replace-overlay, viper-last-posn-in-replace-region) (viper-last-posn-while-in-insert-state) (viper-sitting-in-replace, viper-replace-chars-to-delete) (viper-replace-region-chars-deleted, viper-current-state) (viper-cted, viper-current-indent, viper-preserve-indent) (viper-auto-indent, viper-electric-mode, viper-insert-point) (viper-pre-command-point, viper-com-point) (viper-ex-style-motion, viper-ex-style-editing) (viper-ESC-moves-cursor-back, viper-delete-backwards-in-replace) (viper-related-files-and-buffers-ring) (viper-local-search-start-marker, viper-search-overlay) (viper-last-jump, viper-last-jump-ignore) (viper-minibuffer-current-face, viper-minibuffer-overlay): * lisp/emulation/viper-keym.el (viper-vi-local-user-map) (viper-insert-local-user-map, viper-emacs-local-user-map) (viper--key-maps, viper-need-new-vi-local-map) (viper-need-new-insert-local-map) (viper-need-new-emacs-local-map): * lisp/emulation/viper-mous.el (viper-mouse-click-search-noerror) (viper-mouse-click-search-limit): * lisp/emulation/viper-util.el (viper-non-word-characters) (viper-ALPHA-char-class): * lisp/emulation/viper.el: Use defvar-local instead of now obsolete macro viper-deflocalvar.
-rw-r--r--lisp/emulation/viper-cmd.el2
-rw-r--r--lisp/emulation/viper-init.el117
-rw-r--r--lisp/emulation/viper-keym.el22
-rw-r--r--lisp/emulation/viper-mous.el11
-rw-r--r--lisp/emulation/viper-util.el10
-rw-r--r--lisp/emulation/viper.el5
6 files changed, 68 insertions, 99 deletions
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index 1e235831d6f..f38be908897 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -1624,7 +1624,7 @@ invokes the command before that, etc."
;; The following two functions are used to set up undo properly.
;; In VI, unlike Emacs, if you open a line, say, and add a bunch of lines,
;; they are undone all at once.
-(viper-deflocalvar viper--undo-change-group-handle nil)
+(defvar-local viper--undo-change-group-handle nil)
(put 'viper--undo-change-group-handle 'permanent-local t)
(defun viper-adjust-undo ()
diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el
index cede99bff73..c05cf6a48b4 100644
--- a/lisp/emulation/viper-init.el
+++ b/lisp/emulation/viper-init.el
@@ -91,11 +91,9 @@ In all likelihood, you don't need to bother with this setting."
"Define VAR as a buffer-local variable.
DEFAULT-VALUE is the default value, and DOCUMENTATION is the
docstring. The variable becomes buffer-local whenever set."
- (declare (indent defun))
- `(progn
- (defvar ,var ,default-value
- ,(format "%s\n(buffer local)" documentation))
- (make-variable-buffer-local ',var)))
+ (declare (indent defun)
+ (obsolete defvar-local "28.1"))
+ `(defvar-local ,var ,default-value ,documentation))
;; (viper-loop COUNT BODY) Execute BODY COUNT times.
(defmacro viper-loop (count &rest body)
@@ -161,87 +159,87 @@ docstring. The variable becomes buffer-local whenever set."
;;; Viper minor modes
;; Mode for vital things like \e, C-z.
-(viper-deflocalvar viper-vi-intercept-minor-mode nil)
+(defvar-local viper-vi-intercept-minor-mode nil)
-(viper-deflocalvar viper-vi-basic-minor-mode nil
+(defvar-local viper-vi-basic-minor-mode nil
"Viper's minor mode for Vi bindings.")
-(viper-deflocalvar viper-vi-local-user-minor-mode nil
+(defvar-local viper-vi-local-user-minor-mode nil
"Auxiliary minor mode for user-defined local bindings in Vi state.")
-(viper-deflocalvar viper-vi-global-user-minor-mode nil
+(defvar-local viper-vi-global-user-minor-mode nil
"Auxiliary minor mode for user-defined global bindings in Vi state.")
-(viper-deflocalvar viper-vi-state-modifier-minor-mode nil
+(defvar-local viper-vi-state-modifier-minor-mode nil
"Minor mode used to make major-mode-specific modification to Vi state.")
-(viper-deflocalvar viper-vi-diehard-minor-mode nil
+(defvar-local viper-vi-diehard-minor-mode nil
"This minor mode is in effect when the user wants Viper to be Vi.")
-(viper-deflocalvar viper-vi-kbd-minor-mode nil
+(defvar-local viper-vi-kbd-minor-mode nil
"Minor mode for Ex command macros in Vi state.
The corresponding keymap stores key bindings of Vi macros defined with
the Ex command :map.")
;; Mode for vital things like \e, C-z.
-(viper-deflocalvar viper-insert-intercept-minor-mode nil)
+(defvar-local viper-insert-intercept-minor-mode nil)
-(viper-deflocalvar viper-insert-basic-minor-mode nil
+(defvar-local viper-insert-basic-minor-mode nil
"Viper's minor mode for bindings in Insert mode.")
-(viper-deflocalvar viper-insert-local-user-minor-mode nil
+(defvar-local viper-insert-local-user-minor-mode nil
"Auxiliary minor mode for buffer-local user-defined bindings in Insert state.
This is a way to overshadow normal Insert mode bindings locally to certain
designated buffers.")
-(viper-deflocalvar viper-insert-global-user-minor-mode nil
+(defvar-local viper-insert-global-user-minor-mode nil
"Auxiliary minor mode for global user-defined bindings in Insert state.")
-(viper-deflocalvar viper-insert-state-modifier-minor-mode nil
+(defvar-local viper-insert-state-modifier-minor-mode nil
"Minor mode used to make major-mode-specific modification to Insert state.")
-(viper-deflocalvar viper-insert-diehard-minor-mode nil
+(defvar-local viper-insert-diehard-minor-mode nil
"Minor mode that simulates Vi very closely.
Not recommended, except for the novice user.")
-(viper-deflocalvar viper-insert-kbd-minor-mode nil
+(defvar-local viper-insert-kbd-minor-mode nil
"Minor mode for Ex command macros Insert state.
The corresponding keymap stores key bindings of Vi macros defined with
the Ex command :map!.")
-(viper-deflocalvar viper-replace-minor-mode nil
+(defvar-local viper-replace-minor-mode nil
"Minor mode in effect in replace state (cw, C, and the like commands).")
;; Mode for vital things like \C-z and \C-x) This is set to t, when viper-mode
;; is invoked. So, any new buffer will have C-z defined as switch to Vi,
;; unless we switched states in this buffer
-(viper-deflocalvar viper-emacs-intercept-minor-mode nil)
+(defvar-local viper-emacs-intercept-minor-mode nil)
-(viper-deflocalvar viper-emacs-local-user-minor-mode nil
+(defvar-local viper-emacs-local-user-minor-mode nil
"Minor mode for local user bindings effective in Emacs state.
Users can use it to override Emacs bindings when Viper is in its Emacs
state.")
-(viper-deflocalvar viper-emacs-global-user-minor-mode nil
+(defvar-local viper-emacs-global-user-minor-mode nil
"Minor mode for global user bindings in effect in Emacs state.
Users can use it to override Emacs bindings when Viper is in its Emacs
state.")
-(viper-deflocalvar viper-emacs-kbd-minor-mode nil
+(defvar-local viper-emacs-kbd-minor-mode nil
"Minor mode for Vi style macros in Emacs state.
The corresponding keymap stores key bindings of Vi macros defined with
`viper-record-kbd-macro' command. There is no Ex-level command to do this
interactively.")
-(viper-deflocalvar viper-emacs-state-modifier-minor-mode nil
+(defvar-local viper-emacs-state-modifier-minor-mode nil
"Minor mode used to make major-mode-specific modification to Emacs state.
For instance, a Vi purist may want to bind `dd' in Dired mode to a function
that deletes a file.")
-(viper-deflocalvar viper-vi-minibuffer-minor-mode nil
+(defvar-local viper-vi-minibuffer-minor-mode nil
"Minor mode that forces Vi-style when the Minibuffer is in Vi state.")
-(viper-deflocalvar viper-insert-minibuffer-minor-mode nil
+(defvar-local viper-insert-minibuffer-minor-mode nil
"Minor mode that forces Vi-style when the Minibuffer is in Insert state.")
@@ -284,7 +282,7 @@ Use `\\[viper-set-expert-level]' to change this.")
;; If non-nil, ISO accents will be turned on in insert/replace emacs states and
;; turned off in vi-state. For some users, this behavior may be too
;; primitive. In this case, use insert/emacs/vi state hooks.
-(viper-deflocalvar viper-automatic-iso-accents nil "")
+(defvar-local viper-automatic-iso-accents nil "")
;; Set iso-accents-mode to ARG. Check if it is bound first
(defsubst viper-set-iso-accents-mode (arg)
(if (boundp 'iso-accents-mode)
@@ -294,7 +292,7 @@ Use `\\[viper-set-expert-level]' to change this.")
;; Don't change this!
(defvar viper-mule-hook-flag t)
;; If non-nil, the default intl. input method is turned on.
-(viper-deflocalvar viper-special-input-method nil "")
+(defvar-local viper-special-input-method nil "")
;; viper hook to run on input-method activation
(defun viper-activate-input-method-action ()
@@ -357,7 +355,7 @@ it better fits your working style."
;; Replace mode and changing text
;; Hack used to pass global states around for short period of time
-(viper-deflocalvar viper-intermediate-command nil "")
+(defvar-local viper-intermediate-command nil "")
;; This is used to pass the right Vi command key sequence to
;; viper-set-destructive-command whenever (this-command-keys) doesn't give the
@@ -367,7 +365,7 @@ it better fits your working style."
(defconst viper-this-command-keys nil)
;; Indicates that the current destructive command has started in replace mode.
-(viper-deflocalvar viper-began-as-replace nil "")
+(defvar-local viper-began-as-replace nil "")
(defcustom viper-allow-multiline-replace-regions t
"If non-nil, Viper will allow multi-line replace regions.
@@ -398,7 +396,7 @@ delete the text being replaced, as in standard Vi."
;; internal var, used to remember the default cursor color of emacs frames
(defvar viper-vi-state-cursor-color nil)
-(viper-deflocalvar viper-replace-overlay nil "")
+(defvar-local viper-replace-overlay nil "")
(put 'viper-replace-overlay 'permanent-local t)
(defcustom viper-replace-region-end-delimiter "$"
@@ -430,24 +428,24 @@ color displays. By default, the delimiters are used only on TTYs."
;; `viper-move-marker-locally'
;;
;; Remember the last position inside the replace region.
-(viper-deflocalvar viper-last-posn-in-replace-region nil)
+(defvar-local viper-last-posn-in-replace-region nil)
;; Remember the last position while inserting
-(viper-deflocalvar viper-last-posn-while-in-insert-state nil)
+(defvar-local viper-last-posn-while-in-insert-state nil)
(put 'viper-last-posn-in-replace-region 'permanent-local t)
(put 'viper-last-posn-while-in-insert-state 'permanent-local t)
-(viper-deflocalvar viper-sitting-in-replace nil "")
+(defvar-local viper-sitting-in-replace nil "")
(put 'viper-sitting-in-replace 'permanent-local t)
;; Remember the number of characters that have to be deleted in replace
;; mode to compensate for the inserted characters.
-(viper-deflocalvar viper-replace-chars-to-delete 0 "")
+(defvar-local viper-replace-chars-to-delete 0 "")
;; This variable is used internally by the before/after changed functions to
;; determine how many chars were deleted by the change. This can't be
;; determined inside after-change-functions because those get the length of the
;; deleted region, not the number of chars deleted (which are two different
;; things under MULE).
-(viper-deflocalvar viper-replace-region-chars-deleted 0 "")
+(defvar-local viper-replace-region-chars-deleted 0 "")
;; Insertion ring and command ring
(defcustom viper-insertion-ring-size 14
@@ -490,28 +488,28 @@ will make it hard to use Vi-style timeout macros."
;; Modes and related variables
;; Current mode. One of: `emacs-state', `vi-state', `insert-state'
-(viper-deflocalvar viper-current-state 'emacs-state)
+(defvar-local viper-current-state 'emacs-state)
;; Autoindent in insert
;; Variable that keeps track of whether C-t has been pressed.
-(viper-deflocalvar viper-cted nil "")
+(defvar-local viper-cted nil "")
;; Preserve the indent value, used by C-d in insert mode.
-(viper-deflocalvar viper-current-indent 0)
+(defvar-local viper-current-indent 0)
;; Whether to preserve the indent, used by C-d in insert mode.
-(viper-deflocalvar viper-preserve-indent nil)
+(defvar-local viper-preserve-indent nil)
-(viper-deflocalvar viper-auto-indent nil "")
+(defvar-local viper-auto-indent nil "")
(defcustom viper-auto-indent nil
"Enable autoindent, if t.
This is a buffer-local variable."
:type 'boolean
:group 'viper)
-(viper-deflocalvar viper-electric-mode t "")
+(defvar-local viper-electric-mode t "")
(defcustom viper-electric-mode t
"If t, electrify Viper.
Currently, this only electrifies auto-indentation, making it appropriate to the
@@ -541,7 +539,7 @@ to a new place after repeating previous Vi command."
;; Remember insert point as a marker. This is a local marker that must be
;; initialized to nil and moved with `viper-move-marker-locally'.
-(viper-deflocalvar viper-insert-point nil)
+(defvar-local viper-insert-point nil)
(put 'viper-insert-point 'permanent-local t)
;; This remembers the point before dabbrev-expand was called.
@@ -562,7 +560,7 @@ to a new place after repeating previous Vi command."
;; problem. However, the same trick can be used if such a command is
;; discovered later.
;;
-(viper-deflocalvar viper-pre-command-point nil)
+(defvar-local viper-pre-command-point nil)
(put 'viper-pre-command-point 'permanent-local t) ; this is probably an overkill
;; This is used for saving inserted text.
@@ -573,7 +571,7 @@ to a new place after repeating previous Vi command."
;; Remember com point as a marker.
;; This is a local marker. Should be moved with `viper-move-marker-locally'
-(viper-deflocalvar viper-com-point nil)
+(defvar-local viper-com-point nil)
;; If non-nil, the value is a list (M-COM VAL COM REG inserted-text cmd-keys)
;; It is used to re-execute last destructive command.
@@ -660,14 +658,14 @@ negative number."
:type 'boolean
:group 'viper)
-(viper-deflocalvar viper-ex-style-motion t "")
+(defvar-local viper-ex-style-motion t "")
(defcustom viper-ex-style-motion t
"If t, the commands l,h do not cross lines, etc (Ex-style).
If nil, these commands cross line boundaries."
:type 'boolean
:group 'viper)
-(viper-deflocalvar viper-ex-style-editing t "")
+(defvar-local viper-ex-style-editing t "")
(defcustom viper-ex-style-editing t
"If t, Ex-style behavior while editing in Vi command and insert states.
`Backspace' and `Delete' don't cross line boundaries in insert.
@@ -679,14 +677,14 @@ If nil, the above commands can work across lines."
:type 'boolean
:group 'viper)
-(viper-deflocalvar viper-ESC-moves-cursor-back viper-ex-style-editing "")
+(defvar-local viper-ESC-moves-cursor-back viper-ex-style-editing "")
(defcustom viper-ESC-moves-cursor-back nil
"If t, ESC moves cursor back when changing from insert to vi state.
If nil, the cursor stays where it was when ESC was hit."
:type 'boolean
:group 'viper)
-(viper-deflocalvar viper-delete-backwards-in-replace nil "")
+(defvar-local viper-delete-backwards-in-replace nil "")
(defcustom viper-delete-backwards-in-replace nil
"If t, DEL key will delete characters while moving the cursor backwards.
If nil, the cursor will move backwards without deleting anything."
@@ -704,7 +702,7 @@ If nil, the cursor will move backwards without deleting anything."
:tag "Search Wraps Around"
:group 'viper-search)
-(viper-deflocalvar viper-related-files-and-buffers-ring nil "")
+(defvar-local viper-related-files-and-buffers-ring nil "")
(defcustom viper-related-files-and-buffers-ring nil
"List of file and buffer names to consider related to the current buffer.
Related buffers can be cycled through via :R and :P commands."
@@ -713,12 +711,12 @@ Related buffers can be cycled through via :R and :P commands."
(put 'viper-related-files-and-buffers-ring 'permanent-local t)
;; Used to find out if we are done with searching the current buffer.
-(viper-deflocalvar viper-local-search-start-marker nil)
+(defvar-local viper-local-search-start-marker nil)
;; As above, but global
(defvar viper-search-start-marker (make-marker))
;; the search overlay
-(viper-deflocalvar viper-search-overlay nil)
+(defvar-local viper-search-overlay nil)
(defvar viper-heading-start
@@ -745,9 +743,9 @@ Related buffers can be cycled through via :R and :P commands."
;; inside the lines.
;; Remembers position of the last jump done using ``'.
-(viper-deflocalvar viper-last-jump nil)
+(defvar-local viper-last-jump nil)
;; Remembers position of the last jump done using `''.
-(viper-deflocalvar viper-last-jump-ignore 0)
+(defvar-local viper-last-jump-ignore 0)
;; History variables
@@ -841,7 +839,7 @@ to customize the actual face object `viper-minibuffer-vi'
this variable represents.")
;; the current face to be used in the minibuffer
-(viper-deflocalvar
+(defvar-local
viper-minibuffer-current-face viper-minibuffer-emacs-face "")
@@ -877,7 +875,7 @@ Should be set in `viper-custom-file-name'."
:group 'viper)
;; overlay used in the minibuffer to indicate which state it is in
-(viper-deflocalvar viper-minibuffer-overlay nil)
+(defvar-local viper-minibuffer-overlay nil)
(put 'viper-minibuffer-overlay 'permanent-local t)
;; Hook, specific to Viper, which is run just *before* exiting the minibuffer.
@@ -946,9 +944,4 @@ on a dumb terminal."
(provide 'viper-init)
-
-;; Local Variables:
-;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun)
-;; End:
-
;;; viper-init.el ends here
diff --git a/lisp/emulation/viper-keym.el b/lisp/emulation/viper-keym.el
index 7209dc664b5..1d80c9cd026 100644
--- a/lisp/emulation/viper-keym.el
+++ b/lisp/emulation/viper-keym.el
@@ -82,7 +82,7 @@ major mode in effect."
(defvar viper-insert-intercept-map (make-sparse-keymap))
(defvar viper-emacs-intercept-map (make-sparse-keymap))
-(viper-deflocalvar viper-vi-local-user-map (make-sparse-keymap)
+(defvar-local viper-vi-local-user-map (make-sparse-keymap)
"Keymap for user-defined local bindings.
Useful for changing bindings such as ZZ in certain major modes.
For instance, in letter-mode, one may want to bind ZZ to
@@ -106,7 +106,7 @@ This map is global, shared by all buffers.")
This happens when viper-expert-level is 1 or 2. See viper-set-expert-level.")
-(viper-deflocalvar viper-insert-local-user-map (make-sparse-keymap)
+(defvar-local viper-insert-local-user-map (make-sparse-keymap)
"Auxiliary map for per-buffer user-defined keybindings in Insert state.")
(put 'viper-insert-local-user-map 'permanent-local t)
@@ -133,7 +133,7 @@ viper-insert-basic-map. Not recommended, except for novice users.")
(defvar viper-emacs-kbd-map (make-sparse-keymap)
"This keymap keeps Vi-style kbd macros for Emacs mode.")
-(viper-deflocalvar viper-emacs-local-user-map (make-sparse-keymap)
+(defvar-local viper-emacs-local-user-map (make-sparse-keymap)
"Auxiliary map for local user-defined bindings in Emacs state.")
(put 'viper-emacs-local-user-map 'permanent-local t)
@@ -209,22 +209,22 @@ In insert mode, this key also functions as Meta."
(defvar viper-emacs-state-modifier-alist nil)
;; The list of viper keymaps. Set by viper-normalize-minor-mode-map-alist
-(viper-deflocalvar viper--key-maps nil)
-(viper-deflocalvar viper--intercept-key-maps nil)
+(defvar-local viper--key-maps nil)
+(defvar-local viper--intercept-key-maps nil)
;; Tells viper-add-local-keys to create a new viper-vi-local-user-map for new
;; buffers. Not a user option.
-(viper-deflocalvar viper-need-new-vi-local-map t "")
+(defvar-local viper-need-new-vi-local-map t "")
(put 'viper-need-new-vi-local-map 'permanent-local t)
;; Tells viper-add-local-keys to create a new viper-insert-local-user-map for
;; new buffers. Not a user option.
-(viper-deflocalvar viper-need-new-insert-local-map t "")
+(defvar-local viper-need-new-insert-local-map t "")
(put 'viper-need-new-insert-local-map 'permanent-local t)
;; Tells viper-add-local-keys to create a new viper-emacs-local-user-map for
;; new buffers. Not a user option.
-(viper-deflocalvar viper-need-new-emacs-local-map t "")
+(defvar-local viper-need-new-emacs-local-map t "")
(put 'viper-need-new-emacs-local-map 'permanent-local t)
@@ -654,10 +654,4 @@ form ((key . function) (key . function) ... )."
(provide 'viper-keym)
-
-;; Local Variables:
-;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun)
-;; End:
-
-
;;; viper-keym.el ends here
diff --git a/lisp/emulation/viper-mous.el b/lisp/emulation/viper-mous.el
index eec83dd05b5..71e40ee023e 100644
--- a/lisp/emulation/viper-mous.el
+++ b/lisp/emulation/viper-mous.el
@@ -74,10 +74,10 @@ considered related."
:group 'viper-mouse)
;; Local variable used to toggle wraparound search on click.
-(viper-deflocalvar viper-mouse-click-search-noerror t)
+(defvar-local viper-mouse-click-search-noerror t)
;; Local variable used to delimit search after wraparound.
-(viper-deflocalvar viper-mouse-click-search-limit nil)
+(defvar-local viper-mouse-click-search-limit nil)
;; remembers prefix argument to pass along to commands invoked by second
;; click.
@@ -592,11 +592,4 @@ This buffer may be different from the one where the click occurred."
:set 'viper-reset-mouse-insert-key
:group 'viper-mouse)
-
-
-;; Local Variables:
-;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun)
-;; End:
-
-
;;; viper-mous.el ends here
diff --git a/lisp/emulation/viper-util.el b/lisp/emulation/viper-util.el
index 07a234bab9b..1bdb155538a 100644
--- a/lisp/emulation/viper-util.el
+++ b/lisp/emulation/viper-util.el
@@ -1085,10 +1085,10 @@ the `Local variables' section of a file."
;; These are characters that are not to be considered as parts of a word in
;; Viper.
;; Set each time state changes and at loading time
-(viper-deflocalvar viper-non-word-characters nil)
+(defvar-local viper-non-word-characters nil)
;; must be buffer-local
-(viper-deflocalvar viper-ALPHA-char-class "w"
+(defvar-local viper-ALPHA-char-class "w"
"String of syntax classes characterizing Viper's alphanumeric symbols.
In addition, the symbol `_' may be considered alphanumeric if
`viper-syntax-preference' is `strict-vi' or `reformed-vi'.")
@@ -1375,10 +1375,4 @@ This option is appropriate if you like Emacs-style words."
(setq i (1+ i) start (1+ start)))
res))))))
-
-
-;; Local Variables:
-;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun)
-;; End:
-
;;; viper-util.el ends here
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el
index 6c9428060fc..df5a083a08a 100644
--- a/lisp/emulation/viper.el
+++ b/lisp/emulation/viper.el
@@ -1256,9 +1256,4 @@ These two lines must come in the order given."))
(provide 'viper)
-
-;; Local Variables:
-;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun)
-;; End:
-
;;; viper.el ends here