[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-25 8d2f78c: Don't treat JS spread as contination met
From: |
Dmitry Gutov |
Subject: |
[Emacs-diffs] emacs-25 8d2f78c: Don't treat JS spread as contination method call |
Date: |
Tue, 10 May 2016 23:27:56 +0000 (UTC) |
branch: emacs-25
commit 8d2f78c421c73730f344dbf71dbed61d5ef8e46d
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
Don't treat JS spread as contination method call
* lisp/progmodes/js.el (js--indent-operator-re):
Allow only one dot (bug#23492).
* test/indent/js.js (default): Add a corresponding example.
---
lisp/progmodes/js.el | 2 +-
test/indent/js.js | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index 48eb3e7..f024d39 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -1744,7 +1744,7 @@ This performs fontification according to
`js--class-styles'."
"Regular expression matching variable declaration keywords.")
(defconst js--indent-operator-re
- (concat "[-+*/%<>&^|?:.]\\([^-+*/]\\|$\\)\\|!?=\\|"
+ (concat "[-+*/%<>&^|?:.]\\([^-+*/.]\\|$\\)\\|!?=\\|"
(js--regexp-opt-symbol '("in" "instanceof")))
"Regexp matching operators that affect indentation of continued
expressions.")
diff --git a/test/indent/js.js b/test/indent/js.js
index 23fae17..b40d47b 100644
--- a/test/indent/js.js
+++ b/test/indent/js.js
@@ -103,6 +103,12 @@ Foobar
console.log(num);
});
+var z = [
+ ...iterableObj,
+ 4,
+ 5
+]
+
var arr = [
-1, 2,
-3, 4 +
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-25 8d2f78c: Don't treat JS spread as contination method call,
Dmitry Gutov <=