[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 1276ba7: * lisp/progmodes/js.el (js--make-framework-matcher): Use
From: |
Stefan Monnier |
Subject: |
master 1276ba7: * lisp/progmodes/js.el (js--make-framework-matcher): Use a closure |
Date: |
Tue, 18 May 2021 20:30:13 -0400 (EDT) |
branch: master
commit 1276ba75eb0d308b76df34c522bb0d6e059c146e
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
* lisp/progmodes/js.el (js--make-framework-matcher): Use a closure
---
lisp/progmodes/js.el | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index 1ab0459..c2481f6 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -1060,7 +1060,7 @@ Return the pitem of the function we went to the beginning
of."
(t
(js--beginning-of-defun-nested))))))
-(defun js--flush-caches (&optional beg ignored)
+(defun js--flush-caches (&optional beg _ignored)
"Flush the `js-mode' syntax cache after position BEG.
BEG defaults to `point-min', meaning to flush the entire cache."
(interactive)
@@ -1473,11 +1473,10 @@ LIMIT defaults to point."
"Helper function for building `js--font-lock-keywords'.
Create a byte-compiled function for matching a concatenation of
REGEXPS, but only if FRAMEWORK is in `js-enabled-frameworks'."
- (setq regexps (apply #'concat regexps))
- (byte-compile
- `(lambda (limit)
- (when (memq (quote ,framework) js-enabled-frameworks)
- (re-search-forward ,regexps limit t)))))
+ (let ((regexp (apply #'concat regexps)))
+ (lambda (limit)
+ (when (memq framework js-enabled-frameworks)
+ (re-search-forward regexp limit t)))))
(defvar-local js--tmp-location nil)
@@ -4181,8 +4180,9 @@ browser, respectively."
"style" "")
cmds)))
- (eval (list 'with-js
- (cons 'js-list (nreverse cmds))))))
+ (eval `(with-js
+ (js-list ,@(nreverse cmds)))
+ t)))
(command-hook
()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 1276ba7: * lisp/progmodes/js.el (js--make-framework-matcher): Use a closure,
Stefan Monnier <=