]> git.eshelyaron.com Git - emacs.git/commitdiff
Prefer setq-local in a few more places
authorStefan Kangas <stefan@marxist.se>
Sun, 7 Feb 2021 23:25:16 +0000 (00:25 +0100)
committerStefan Kangas <stefan@marxist.se>
Sun, 7 Feb 2021 23:25:16 +0000 (00:25 +0100)
* lisp/calc/calc-embed.el (calc-embedded-make-info):
* lisp/calc/calcalg2.el (calcFunc-integ):
* lisp/comint.el (comint-mode):
* lisp/epa.el (epa--list-keys, epa--show-key):
* lisp/epg.el (epg--start):
* lisp/vc/ediff-util.el (ediff-activate-mark): Prefer setq-local.

lisp/calc/calc-embed.el
lisp/calc/calcalg2.el
lisp/comint.el
lisp/epa.el
lisp/epg.el
lisp/vc/ediff-util.el

index cfb3fda106c96d446f2fe9574fc84b7c9e9f4aa7..745514047768101f156aaa7c865c430f44a966bd 100644 (file)
@@ -854,31 +854,21 @@ The command \\[yank] can retrieve it from there."
                (newmode (cl-assoc-if #'derived-mode-p
                                      calc-embedded-open-close-mode-alist)))
            (when newann
-             (make-local-variable 'calc-embedded-announce-formula)
-             (setq calc-embedded-announce-formula (cdr newann)))
+             (setq-local calc-embedded-announce-formula (cdr newann)))
            (when newform
-             (make-local-variable 'calc-embedded-open-formula)
-             (make-local-variable 'calc-embedded-close-formula)
-             (setq calc-embedded-open-formula (nth 0 (cdr newform)))
-             (setq calc-embedded-close-formula (nth 1 (cdr newform))))
+             (setq-local calc-embedded-open-formula (nth 0 (cdr newform)))
+             (setq-local calc-embedded-close-formula (nth 1 (cdr newform))))
            (when newword
-             (make-local-variable 'calc-embedded-word-regexp)
-             (setq calc-embedded-word-regexp (nth 1 newword)))
+             (setq-local calc-embedded-word-regexp (nth 1 newword)))
            (when newplain
-             (make-local-variable 'calc-embedded-open-plain)
-             (make-local-variable 'calc-embedded-close-plain)
-             (setq calc-embedded-open-plain (nth 0 (cdr newplain)))
-             (setq calc-embedded-close-plain (nth 1 (cdr newplain))))
+             (setq-local calc-embedded-open-plain (nth 0 (cdr newplain)))
+             (setq-local calc-embedded-close-plain (nth 1 (cdr newplain))))
            (when newnewform
-             (make-local-variable 'calc-embedded-open-new-formula)
-             (make-local-variable 'calc-embedded-close-new-formula)
-             (setq calc-embedded-open-new-formula (nth 0 (cdr newnewform)))
-             (setq calc-embedded-close-new-formula (nth 1 (cdr newnewform))))
+             (setq-local calc-embedded-open-new-formula (nth 0 (cdr newnewform)))
+             (setq-local calc-embedded-close-new-formula (nth 1 (cdr newnewform))))
            (when newmode
-             (make-local-variable 'calc-embedded-open-mode)
-             (make-local-variable 'calc-embedded-close-mode)
-             (setq calc-embedded-open-mode (nth 0 (cdr newmode)))
-             (setq calc-embedded-close-mode (nth 1 (cdr newmode)))))))
+             (setq-local calc-embedded-open-mode (nth 0 (cdr newmode)))
+             (setq-local calc-embedded-close-mode (nth 1 (cdr newmode)))))))
     (while (and (cdr found)
                (> point (aref (car (cdr found)) 3)))
       (setq found (cdr found)))
index fc6eb74e9f164c081d60c236ab182776799de38d..94b99aa29d8c1ec74b111e30eb2656f259b53500 100644 (file)
                        (set-buffer trace-buffer)
                        (goto-char (point-max))
                        (or (assq 'scroll-stop (buffer-local-variables))
-                           (progn
-                             (make-local-variable 'scroll-step)
-                             (setq scroll-step 3)))
+                            (setq-local scroll-step 3))
                        (insert "\n\n\n")
                        (set-buffer calcbuf)
                        (math-try-integral sexpr))
index a9633d08ba17d0423e998c3bdf6a0bdc4aa5541b..57df6bfb19fee13b633d315fb00706eb7a2d042c 100644 (file)
@@ -700,8 +700,7 @@ Entry to this mode runs the hooks on `comint-mode-hook'."
   ;; https://lists.gnu.org/r/emacs-devel/2007-08/msg00827.html
   ;;
   ;; This makes it really work to keep point at the bottom.
-  ;; (make-local-variable 'scroll-conservatively)
-  ;; (setq scroll-conservatively 10000)
+  ;; (setq-local scroll-conservatively 10000)
   (add-hook 'pre-command-hook 'comint-preinput-scroll-to-bottom t t)
   (make-local-variable 'comint-ptyp)
   (make-local-variable 'comint-process-echoes)
index 197cd92f9773118dd2baefbcfe795cdda2fd4fef..572c947e4b291bd9ddcfe282b31ee2838b9626fd 100644 (file)
@@ -379,8 +379,7 @@ DOC is documentation text to insert at the start."
       (goto-char point))
 
     (epa--insert-keys (epg-list-keys context name secret)))
-  (make-local-variable 'epa-list-keys-arguments)
-  (setq epa-list-keys-arguments (list name secret))
+  (setq-local epa-list-keys-arguments (list name secret))
   (goto-char (point-min))
   (pop-to-buffer (current-buffer)))
 
@@ -500,8 +499,7 @@ If SECRET is non-nil, list secret keys instead of public keys."
                     (format "*Key*%s" (epg-sub-key-id primary-sub-key)))))
     (set-buffer (cdr entry))
     (epa-key-mode)
-    (make-local-variable 'epa-key)
-    (setq epa-key key)
+    (setq-local epa-key key)
     (erase-buffer)
     (setq pointer (epg-key-user-id-list key))
     (while pointer
index 36794d09a75f82e7b4cff5fa12c842633eb5ba6a..36515ef4e5f0dce71ccea3efb3d9d969ed780709 100644 (file)
@@ -641,22 +641,14 @@ callback data (if any)."
     (with-current-buffer buffer
       (if (fboundp 'set-buffer-multibyte)
          (set-buffer-multibyte nil))
-      (make-local-variable 'epg-last-status)
-      (setq epg-last-status nil)
-      (make-local-variable 'epg-read-point)
-      (setq epg-read-point (point-min))
-      (make-local-variable 'epg-process-filter-running)
-      (setq epg-process-filter-running nil)
-      (make-local-variable 'epg-pending-status-list)
-      (setq epg-pending-status-list nil)
-      (make-local-variable 'epg-key-id)
-      (setq epg-key-id nil)
-      (make-local-variable 'epg-context)
-      (setq epg-context context)
-      (make-local-variable 'epg-agent-file)
-      (setq epg-agent-file agent-file)
-      (make-local-variable 'epg-agent-mtime)
-      (setq epg-agent-mtime agent-mtime))
+      (setq-local epg-last-status nil)
+      (setq-local epg-read-point (point-min))
+      (setq-local epg-process-filter-running nil)
+      (setq-local epg-pending-status-list nil)
+      (setq-local epg-key-id nil)
+      (setq-local epg-context context)
+      (setq-local epg-agent-file agent-file)
+      (setq-local epg-agent-mtime agent-mtime))
     (setq error-process
          (make-pipe-process :name "epg-error"
                             :buffer (generate-new-buffer " *epg-error*")
index f955ba8283a3f6690724696f45863ff3073ba36c..9909dcd542476bb5f5475278adb4e742d8b02e18 100644 (file)
@@ -3998,8 +3998,8 @@ Mail anyway? (y or n) ")
 (define-obsolete-function-alias 'ediff-deactivate-mark #'deactivate-mark "27.1")
 
 (defun ediff-activate-mark ()
-  (make-local-variable 'transient-mark-mode)
-  (setq mark-active 'ediff-util transient-mark-mode t))
+  (setq mark-active 'ediff-util)
+  (setq-local transient-mark-mode t))
 
 (define-obsolete-function-alias 'ediff-nuke-selective-display #'ignore "27.1")