aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Gutov2016-11-17 01:58:59 +0200
committerDmitry Gutov2016-11-17 01:59:18 +0200
commit4887e7c6cbe022bd54ec42f3bdceae8fa434a0cd (patch)
tree8c12dc883b8a5dcc338fb099bfb43eeb8f728ad3
parente992ac0a639d01df8f04c18061b0d73f792ff2c2 (diff)
downloademacs-4887e7c6cbe022bd54ec42f3bdceae8fa434a0cd.tar.gz
emacs-4887e7c6cbe022bd54ec42f3bdceae8fa434a0cd.zip
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).
-rw-r--r--lisp/progmodes/js.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index f024d397ffb..6d995a095e6 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -1757,6 +1757,10 @@ This performs fontification according to `js--class-styles'."
1757 (and (js--re-search-backward "[?:{]\\|\\_<case\\_>" nil t) 1757 (and (js--re-search-backward "[?:{]\\|\\_<case\\_>" nil t)
1758 (eq (char-after) ??)))) 1758 (eq (char-after) ??))))
1759 (not (and 1759 (not (and
1760 (eq (char-after) ?/)
1761 (save-excursion
1762 (eq (nth 3 (syntax-ppss)) ?/))))
1763 (not (and
1760 (eq (char-after) ?*) 1764 (eq (char-after) ?*)
1761 ;; Generator method (possibly using computed property). 1765 ;; Generator method (possibly using computed property).
1762 (looking-at (concat "\\* *\\(?:\\[\\|" js--name-re " *(\\)")) 1766 (looking-at (concat "\\* *\\(?:\\[\\|" js--name-re " *(\\)"))