1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-22 07:09:54 +00:00

js-mode: Fix indent problem after a regexp

* lisp/progmodes/js.el (js--looking-at-operator-p): Check that the
slash is not ending a regexp (bug#24854).
This commit is contained in:
Dmitry Gutov 2016-11-17 01:58:59 +02:00
parent e992ac0a63
commit 4887e7c6cb

View File

@ -1756,6 +1756,10 @@ This performs fontification according to `js--class-styles'."
(save-excursion
(and (js--re-search-backward "[?:{]\\|\\_<case\\_>" nil t)
(eq (char-after) ??))))
(not (and
(eq (char-after) ?/)
(save-excursion
(eq (nth 3 (syntax-ppss)) ?/))))
(not (and
(eq (char-after) ?*)
;; Generator method (possibly using computed property).