* lisp/progmodes/js.el (js--ctrl-statement-indentation): Fix indent

when control-statement is the first statement in a buffer.

Fixes: debbugs:15956
This commit is contained in:
Mihir Rege 2013-11-25 00:01:08 +02:00 committed by Dmitry Gutov
parent ee4f026188
commit 64e415297c
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2013-11-22 Mihir Rege <mihirrege@gmail.com> (tiny change)
* progmodes/js.el (js--ctrl-statement-indentation): Fix indent
when control-statement is the first statement in a buffer (Bug#15956).
2013-11-24 Dmitry Gutov <dgutov@yandex.ru>
* imenu.el (imenu-generic-skip-comments-and-strings):

View file

@ -1749,8 +1749,8 @@ nil."
(when (save-excursion
(and (not (eq (point-at-bol) (point-min)))
(not (looking-at "[{]"))
(js--re-search-backward "[[:graph:]]" nil t)
(progn
(js--re-search-backward "[[:graph:]]" nil t)
(or (eobp) (forward-char))
(when (= (char-before) ?\)) (backward-list))
(skip-syntax-backward " ")