]> code.delx.au - gnu-emacs-elpa/commitdiff
Fixed the odd indentation for the "else if" with no brace
authormooz <stillpedant@gmail.com>
Fri, 19 Mar 2010 03:46:19 +0000 (12:46 +0900)
committermooz <stillpedant@gmail.com>
Fri, 19 Mar 2010 03:46:19 +0000 (12:46 +0900)
js2-mode.el

index 4fba8c80b2dd468d8ebb574e7c3713720645e20f..c577c61a4f6af116f9994b2ff7053238e4d73301 100644 (file)
@@ -9774,7 +9774,10 @@ returns nil."
                      (when (looking-at "(") (backward-word 1))
                      (and (save-excursion
                             (skip-chars-backward " \t}" (point-at-bol))
-                            (bolp))
+                            (or (bolp)
+                                (and (backward-word 1)
+                                     (bolp)
+                                     (looking-at "[ \t}]*else[ \t]+if"))))
                           (looking-at js-possibly-braceless-keyword-re)
                           (not (js-end-of-do-while-loop-p))))))
         (save-excursion