aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas2021-02-08 00:25:16 +0100
committerStefan Kangas2021-02-08 00:25:16 +0100
commit7d4d577ed14fb2519ea2eaecb11c8ecff658f147 (patch)
treef19b3bfdc2c8e8b748e53fb748450334a02dace3
parent651aefa31246a786891e2e743800dbf753223928 (diff)
downloademacs-7d4d577ed14fb2519ea2eaecb11c8ecff658f147.tar.gz
emacs-7d4d577ed14fb2519ea2eaecb11c8ecff658f147.zip
Prefer setq-local in a few more places
* 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.
-rw-r--r--lisp/calc/calc-embed.el30
-rw-r--r--lisp/calc/calcalg2.el4
-rw-r--r--lisp/comint.el3
-rw-r--r--lisp/epa.el6
-rw-r--r--lisp/epg.el24
-rw-r--r--lisp/vc/ediff-util.el4
6 files changed, 24 insertions, 47 deletions
diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el
index cfb3fda106c..74551404776 100644
--- a/lisp/calc/calc-embed.el
+++ b/lisp/calc/calc-embed.el
@@ -854,31 +854,21 @@ The command \\[yank] can retrieve it from there."
854 (newmode (cl-assoc-if #'derived-mode-p 854 (newmode (cl-assoc-if #'derived-mode-p
855 calc-embedded-open-close-mode-alist))) 855 calc-embedded-open-close-mode-alist)))
856 (when newann 856 (when newann
857 (make-local-variable 'calc-embedded-announce-formula) 857 (setq-local calc-embedded-announce-formula (cdr newann)))
858 (setq calc-embedded-announce-formula (cdr newann)))
859 (when newform 858 (when newform
860 (make-local-variable 'calc-embedded-open-formula) 859 (setq-local calc-embedded-open-formula (nth 0 (cdr newform)))
861 (make-local-variable 'calc-embedded-close-formula) 860 (setq-local calc-embedded-close-formula (nth 1 (cdr newform))))
862 (setq calc-embedded-open-formula (nth 0 (cdr newform)))
863 (setq calc-embedded-close-formula (nth 1 (cdr newform))))
864 (when newword 861 (when newword
865 (make-local-variable 'calc-embedded-word-regexp) 862 (setq-local calc-embedded-word-regexp (nth 1 newword)))
866 (setq calc-embedded-word-regexp (nth 1 newword)))
867 (when newplain 863 (when newplain
868 (make-local-variable 'calc-embedded-open-plain) 864 (setq-local calc-embedded-open-plain (nth 0 (cdr newplain)))
869 (make-local-variable 'calc-embedded-close-plain) 865 (setq-local calc-embedded-close-plain (nth 1 (cdr newplain))))
870 (setq calc-embedded-open-plain (nth 0 (cdr newplain)))
871 (setq calc-embedded-close-plain (nth 1 (cdr newplain))))
872 (when newnewform 866 (when newnewform
873 (make-local-variable 'calc-embedded-open-new-formula) 867 (setq-local calc-embedded-open-new-formula (nth 0 (cdr newnewform)))
874 (make-local-variable 'calc-embedded-close-new-formula) 868 (setq-local calc-embedded-close-new-formula (nth 1 (cdr newnewform))))
875 (setq calc-embedded-open-new-formula (nth 0 (cdr newnewform)))
876 (setq calc-embedded-close-new-formula (nth 1 (cdr newnewform))))
877 (when newmode 869 (when newmode
878 (make-local-variable 'calc-embedded-open-mode) 870 (setq-local calc-embedded-open-mode (nth 0 (cdr newmode)))
879 (make-local-variable 'calc-embedded-close-mode) 871 (setq-local calc-embedded-close-mode (nth 1 (cdr newmode)))))))
880 (setq calc-embedded-open-mode (nth 0 (cdr newmode)))
881 (setq calc-embedded-close-mode (nth 1 (cdr newmode)))))))
882 (while (and (cdr found) 872 (while (and (cdr found)
883 (> point (aref (car (cdr found)) 3))) 873 (> point (aref (car (cdr found)) 3)))
884 (setq found (cdr found))) 874 (setq found (cdr found)))
diff --git a/lisp/calc/calcalg2.el b/lisp/calc/calcalg2.el
index fc6eb74e9f1..94b99aa29d8 100644
--- a/lisp/calc/calcalg2.el
+++ b/lisp/calc/calcalg2.el
@@ -1545,9 +1545,7 @@
1545 (set-buffer trace-buffer) 1545 (set-buffer trace-buffer)
1546 (goto-char (point-max)) 1546 (goto-char (point-max))
1547 (or (assq 'scroll-stop (buffer-local-variables)) 1547 (or (assq 'scroll-stop (buffer-local-variables))
1548 (progn 1548 (setq-local scroll-step 3))
1549 (make-local-variable 'scroll-step)
1550 (setq scroll-step 3)))
1551 (insert "\n\n\n") 1549 (insert "\n\n\n")
1552 (set-buffer calcbuf) 1550 (set-buffer calcbuf)
1553 (math-try-integral sexpr)) 1551 (math-try-integral sexpr))
diff --git a/lisp/comint.el b/lisp/comint.el
index a9633d08ba1..57df6bfb19f 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -700,8 +700,7 @@ Entry to this mode runs the hooks on `comint-mode-hook'."
700 ;; https://lists.gnu.org/r/emacs-devel/2007-08/msg00827.html 700 ;; https://lists.gnu.org/r/emacs-devel/2007-08/msg00827.html
701 ;; 701 ;;
702 ;; This makes it really work to keep point at the bottom. 702 ;; This makes it really work to keep point at the bottom.
703 ;; (make-local-variable 'scroll-conservatively) 703 ;; (setq-local scroll-conservatively 10000)
704 ;; (setq scroll-conservatively 10000)
705 (add-hook 'pre-command-hook 'comint-preinput-scroll-to-bottom t t) 704 (add-hook 'pre-command-hook 'comint-preinput-scroll-to-bottom t t)
706 (make-local-variable 'comint-ptyp) 705 (make-local-variable 'comint-ptyp)
707 (make-local-variable 'comint-process-echoes) 706 (make-local-variable 'comint-process-echoes)
diff --git a/lisp/epa.el b/lisp/epa.el
index 197cd92f977..572c947e4b2 100644
--- a/lisp/epa.el
+++ b/lisp/epa.el
@@ -379,8 +379,7 @@ DOC is documentation text to insert at the start."
379 (goto-char point)) 379 (goto-char point))
380 380
381 (epa--insert-keys (epg-list-keys context name secret))) 381 (epa--insert-keys (epg-list-keys context name secret)))
382 (make-local-variable 'epa-list-keys-arguments) 382 (setq-local epa-list-keys-arguments (list name secret))
383 (setq epa-list-keys-arguments (list name secret))
384 (goto-char (point-min)) 383 (goto-char (point-min))
385 (pop-to-buffer (current-buffer))) 384 (pop-to-buffer (current-buffer)))
386 385
@@ -500,8 +499,7 @@ If SECRET is non-nil, list secret keys instead of public keys."
500 (format "*Key*%s" (epg-sub-key-id primary-sub-key))))) 499 (format "*Key*%s" (epg-sub-key-id primary-sub-key)))))
501 (set-buffer (cdr entry)) 500 (set-buffer (cdr entry))
502 (epa-key-mode) 501 (epa-key-mode)
503 (make-local-variable 'epa-key) 502 (setq-local epa-key key)
504 (setq epa-key key)
505 (erase-buffer) 503 (erase-buffer)
506 (setq pointer (epg-key-user-id-list key)) 504 (setq pointer (epg-key-user-id-list key))
507 (while pointer 505 (while pointer
diff --git a/lisp/epg.el b/lisp/epg.el
index 36794d09a75..36515ef4e5f 100644
--- a/lisp/epg.el
+++ b/lisp/epg.el
@@ -641,22 +641,14 @@ callback data (if any)."
641 (with-current-buffer buffer 641 (with-current-buffer buffer
642 (if (fboundp 'set-buffer-multibyte) 642 (if (fboundp 'set-buffer-multibyte)
643 (set-buffer-multibyte nil)) 643 (set-buffer-multibyte nil))
644 (make-local-variable 'epg-last-status) 644 (setq-local epg-last-status nil)
645 (setq epg-last-status nil) 645 (setq-local epg-read-point (point-min))
646 (make-local-variable 'epg-read-point) 646 (setq-local epg-process-filter-running nil)
647 (setq epg-read-point (point-min)) 647 (setq-local epg-pending-status-list nil)
648 (make-local-variable 'epg-process-filter-running) 648 (setq-local epg-key-id nil)
649 (setq epg-process-filter-running nil) 649 (setq-local epg-context context)
650 (make-local-variable 'epg-pending-status-list) 650 (setq-local epg-agent-file agent-file)
651 (setq epg-pending-status-list nil) 651 (setq-local epg-agent-mtime agent-mtime))
652 (make-local-variable 'epg-key-id)
653 (setq epg-key-id nil)
654 (make-local-variable 'epg-context)
655 (setq epg-context context)
656 (make-local-variable 'epg-agent-file)
657 (setq epg-agent-file agent-file)
658 (make-local-variable 'epg-agent-mtime)
659 (setq epg-agent-mtime agent-mtime))
660 (setq error-process 652 (setq error-process
661 (make-pipe-process :name "epg-error" 653 (make-pipe-process :name "epg-error"
662 :buffer (generate-new-buffer " *epg-error*") 654 :buffer (generate-new-buffer " *epg-error*")
diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el
index f955ba8283a..9909dcd5424 100644
--- a/lisp/vc/ediff-util.el
+++ b/lisp/vc/ediff-util.el
@@ -3998,8 +3998,8 @@ Mail anyway? (y or n) ")
3998(define-obsolete-function-alias 'ediff-deactivate-mark #'deactivate-mark "27.1") 3998(define-obsolete-function-alias 'ediff-deactivate-mark #'deactivate-mark "27.1")
3999 3999
4000(defun ediff-activate-mark () 4000(defun ediff-activate-mark ()
4001 (make-local-variable 'transient-mark-mode) 4001 (setq mark-active 'ediff-util)
4002 (setq mark-active 'ediff-util transient-mark-mode t)) 4002 (setq-local transient-mark-mode t))
4003 4003
4004(define-obsolete-function-alias 'ediff-nuke-selective-display #'ignore "27.1") 4004(define-obsolete-function-alias 'ediff-nuke-selective-display #'ignore "27.1")
4005 4005