[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-25 4887e7c: js-mode: Fix indent problem after a rege
From: |
Dmitry Gutov |
Subject: |
[Emacs-diffs] emacs-25 4887e7c: js-mode: Fix indent problem after a regexp |
Date: |
Thu, 17 Nov 2016 00:00:10 +0000 (UTC) |
branch: emacs-25
commit 4887e7c6cbe022bd54ec42f3bdceae8fa434a0cd
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
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).
---
lisp/progmodes/js.el | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index f024d39..6d995a0 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -1757,6 +1757,10 @@ This performs fontification according to
`js--class-styles'."
(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).
(looking-at (concat "\\* *\\(?:\\[\\|" js--name-re " *(\\)"))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-25 4887e7c: js-mode: Fix indent problem after a regexp,
Dmitry Gutov <=