emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 79d287c 2/4: Prefer setq-local in emulation/*.el


From: Stefan Kangas
Subject: master 79d287c 2/4: Prefer setq-local in emulation/*.el
Date: Sun, 6 Dec 2020 04:20:48 -0500 (EST)

branch: master
commit 79d287c7b51758542798985e6b1c7b24b0038619
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    Prefer setq-local in emulation/*.el
    
    * 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       |  2 +-
 lisp/emulation/viper-cmd.el | 14 +++++---------
 lisp/emulation/viper.el     |  2 +-
 3 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/lisp/emulation/edt.el b/lisp/emulation/edt.el
index b29ad77..f61de92 100644
--- a/lisp/emulation/edt.el
+++ b/lisp/emulation/edt.el
@@ -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)))
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index dd7648c..938ebb1 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -474,7 +474,7 @@
 
 ;; 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.
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el
index 59ca629..8510928 100644
--- a/lisp/emulation/viper.el
+++ b/lisp/emulation/viper.el
@@ -617,7 +617,7 @@ This startup message appears whenever you load Viper, 
unless you type `y' now."
 
 ;; 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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]