+2014-11-16 Dmitry Gutov <dgutov@yandex.ru>
+
+ Fix indentation before `!=' and after `+='. Originally reported
+ in https://github.com/mooz/js2-mode/issues/174.
+ * progmodes/js.el (js--indent-operator-re): Make assignments and
+ (in)equality operator a separate case.
+ (js--continued-expression-p): Escape the second `+' in the regexp.
+
2014-11-16 Stefan Monnier <monnier@iro.umontreal.ca>
* window.el (handle-select-window): Deactivate shift-region (bug#19003).
"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.")
(save-excursion (backward-char) (not (looking-at "[/*]/")))
(js--looking-at-operator-p)
(and (progn (backward-char)
- (not (looking-at "++\\|--\\|/[/*]"))))))))))
+ (not (looking-at "+\\+\\|--\\|/[/*]"))))))))))
(defun js--end-of-do-while-loop-p ()