1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Prefer defvar-local in progmodes/*.el

This skips libraries that might want compatibility with Emacs 24.2.

* lisp/progmodes/compile.el (compilation-auto-jump-to-next)
(compilation--previous-directory-cache, compilation--parsed)
(compilation-gcpro):
* lisp/progmodes/cpp.el (cpp-overlay-list, cpp-edit-buffer)
(cpp-parse-symbols, cpp-edit-symbols):
* lisp/progmodes/ebnf2ps.el (ebnf-eps-upper-x, ebnf-eps-upper-y)
(ebnf-eps-prod-width, ebnf-eps-max-height, ebnf-eps-max-width):
* lisp/progmodes/f90.el (f90-cache-position):
* lisp/progmodes/gud.el (gud-marker-acc):
* lisp/progmodes/js.el (js--quick-match-re)
(js--quick-match-re-func, js--cache-end, js--last-parse-pos)
(js--state-at-last-parse-pos, js--tmp-location):
* lisp/progmodes/octave.el (inferior-octave-directory-tracker-resync):
* lisp/progmodes/sh-script.el (sh-header-marker): Prefer defvar-local.
This commit is contained in:
Stefan Kangas 2021-01-31 18:46:17 +01:00
parent 458faaf4c3
commit 59e8c37d61
8 changed files with 27 additions and 52 deletions

View file

@ -717,26 +717,20 @@ This variable is like `sgml-attribute-offset'."
table)
"Syntax table for `js-mode'.")
(defvar js--quick-match-re nil
(defvar-local js--quick-match-re nil
"Autogenerated regexp used by `js-mode' to match buffer constructs.")
(defvar js--quick-match-re-func nil
(defvar-local js--quick-match-re-func nil
"Autogenerated regexp used by `js-mode' to match constructs and functions.")
(make-variable-buffer-local 'js--quick-match-re)
(make-variable-buffer-local 'js--quick-match-re-func)
(defvar js--cache-end 1
(defvar-local js--cache-end 1
"Last valid buffer position for the `js-mode' function cache.")
(make-variable-buffer-local 'js--cache-end)
(defvar js--last-parse-pos nil
(defvar-local js--last-parse-pos nil
"Latest parse position reached by `js--ensure-cache'.")
(make-variable-buffer-local 'js--last-parse-pos)
(defvar js--state-at-last-parse-pos nil
(defvar-local js--state-at-last-parse-pos nil
"Parse state at `js--last-parse-pos'.")
(make-variable-buffer-local 'js--state-at-last-parse-pos)
(defun js--maybe-join (prefix separator suffix &rest list)
"Helper function for `js--update-quick-match-re'.
@ -1505,8 +1499,7 @@ REGEXPS, but only if FRAMEWORK is in `js-enabled-frameworks'."
(when (memq (quote ,framework) js-enabled-frameworks)
(re-search-forward ,regexps limit t)))))
(defvar js--tmp-location nil)
(make-variable-buffer-local 'js--tmp-location)
(defvar-local js--tmp-location nil)
(defun js--forward-destructuring-spec (&optional func)
"Move forward over a JavaScript destructuring spec.