]> git.eshelyaron.com Git - emacs.git/commitdiff
Prefer setq-local in emulation/*.el
authorStefan Kangas <stefan@marxist.se>
Sun, 6 Dec 2020 07:54:50 +0000 (08:54 +0100)
committerStefan Kangas <stefan@marxist.se>
Sun, 6 Dec 2020 07:54:50 +0000 (08:54 +0100)
* lisp/emulation/edt.el (edt-select-mode):
* lisp/emulation/viper-cmd.el (viper-refresh-mode-line):
(viper-minibuffer-setup-sentinel):
* lisp/emulation/viper.el (viper-comint-mode-hook): Prefer setq-local.

lisp/emulation/edt.el
lisp/emulation/viper-cmd.el
lisp/emulation/viper.el

index b29ad7702ef6efa8d0de1955efe415c1eb25bec8..f61de9208d191fe559f076aefcbd36b5c18cc9f9 100644 (file)
@@ -788,7 +788,7 @@ Argument NUM is the number of lines to delete."
 In select mode, selected text is highlighted."
   (if arg
       (progn
-       (set (make-local-variable 'edt-select-mode) 'edt-select-mode-current)
+        (setq-local edt-select-mode 'edt-select-mode-current)
        (setq rect-start-point (window-point)))
     (progn
       (kill-local-variable 'edt-select-mode)))
index dd7648c2b77cd52a17f735b7d0dfa4b84b6b2e6d..938ebb1522785f70a40eedf5dd2962f6d1e03dd8 100644 (file)
 
 ;; Modifies mode-line-buffer-identification.
 (defun viper-refresh-mode-line ()
-  (set (make-local-variable 'viper-mode-string)
+  (setq-local viper-mode-string
        (cond ((eq viper-current-state 'emacs-state) viper-emacs-state-id)
              ((eq viper-current-state 'vi-state) viper-vi-state-id)
              ((eq viper-current-state 'replace-state) viper-replace-state-id)
@@ -1865,14 +1865,10 @@ Undo previous insertion and inserts new."
     ;; minibuffer and vice versa. Otherwise, command arguments will affect
     ;; minibuffer ops and insertions from the minibuffer will change those in
     ;; the normal buffers
-    (make-local-variable 'viper-d-com)
-    (make-local-variable 'viper-last-insertion)
-    (make-local-variable 'viper-command-ring)
-    (setq viper-d-com nil
-         viper-last-insertion nil
-         viper-command-ring nil)
-    (funcall hook)
-    ))
+    (setq-local viper-d-com nil)
+    (setq-local viper-last-insertion nil)
+    (setq-local viper-command-ring nil)
+    (funcall hook)))
 
 ;; This is a temp hook that uses free variables viper--init-message and viper-initial.
 ;; A dirty feature, but it is the simplest way to have it do the right thing.
index 59ca6298eb9331978e267fef2ed90680b1c27f6a..851092819c801f1f765074567ae00da5d2c8d622 100644 (file)
@@ -617,7 +617,7 @@ This startup message appears whenever you load Viper, unless you type `y' now."
 \f
 ;; This hook designed to enable Vi-style editing in comint-based modes."
 (defun viper-comint-mode-hook ()
-  (set (make-local-variable 'require-final-newline) nil)
+  (setq-local require-final-newline nil)
   (setq viper-ex-style-editing nil
        viper-ex-style-motion nil)
   (viper-change-state-to-insert))