summaryrefslogtreecommitdiff
path: root/lisp/progmodes/js.el
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2021-02-10 21:56:55 +0100
committerAndrea Corallo <akrl@sdf.org>2021-02-10 21:56:55 +0100
commit2fcb85c3e780f1f2871ce0f300cfaffce9836eb0 (patch)
treea8857ccad8bff12080062a3edaad1a55a3eb8171 /lisp/progmodes/js.el
parent1f626e9662d8120acd5a937f847123cc2b8c6e31 (diff)
parent6bfdfeed36fab4680c8db90c22da8f6611694186 (diff)
downloademacs-2fcb85c3e780f1f2871ce0f300cfaffce9836eb0.tar.gz
emacs-2fcb85c3e780f1f2871ce0f300cfaffce9836eb0.tar.bz2
emacs-2fcb85c3e780f1f2871ce0f300cfaffce9836eb0.zip
Merge remote-tracking branch 'savannah/master' into HEAD
Diffstat (limited to 'lisp/progmodes/js.el')
-rw-r--r--lisp/progmodes/js.el19
1 files changed, 6 insertions, 13 deletions
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index 33bea59e3ba..cdf6536fc7e 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -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.