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.
This commit is contained in:
Stefan Kangas 2021-02-08 00:25:16 +01:00
parent 651aefa312
commit 7d4d577ed1
6 changed files with 24 additions and 47 deletions

View 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)))

View file

@ -1545,9 +1545,7 @@
(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))

View 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)

View 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

View 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*")

View 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")