mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-13 16:38:14 +00:00
Don't mistake certain JS method calls for keywords
* lisp/progmodes/js.el (js--ctrl-statement-indentation): Braceless keyword can't come after a period (bug#22063).
This commit is contained in:
parent
49689a415c
commit
48471e9614
@ -1823,6 +1823,7 @@ nil."
|
||||
(skip-syntax-backward " ")
|
||||
(skip-syntax-backward "w_")
|
||||
(looking-at js--possibly-braceless-keyword-re))
|
||||
(memq (char-before) '(?\s ?\t ?\n ?\}))
|
||||
(not (js--end-of-do-while-loop-p))))
|
||||
(save-excursion
|
||||
(goto-char (match-beginning 0))
|
||||
|
@ -76,6 +76,20 @@ class A {
|
||||
}
|
||||
}
|
||||
|
||||
if (true)
|
||||
1
|
||||
else
|
||||
2
|
||||
|
||||
Foobar
|
||||
.find()
|
||||
.catch((err) => {
|
||||
return 2;
|
||||
})
|
||||
.then((num) => {
|
||||
console.log(num);
|
||||
});
|
||||
|
||||
// Local Variables:
|
||||
// indent-tabs-mode: nil
|
||||
// js-indent-level: 2
|
||||
|
Loading…
Reference in New Issue
Block a user