Subject: bug#15582: closed (done)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 14 Jan 2017 17:47:02 +0000

Your bug report

#15582: js-mode indent bug

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
15582: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15582
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: done
From: Tom Tromey <[email-masked]>
To: [email-masked]
Date: Sat, 14 Jan 2017 10:45:44 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

This was fixed by b47f97218efb8d9966e084bdfd8a86e8c47cf81d.

Tom

Subject: js-mode indent bug
From: Jakub Jankiewicz <[email-masked]>
To: [email-masked]
Date: Thu, 10 Oct 2013 14:06:48 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

I found this bug in js-mode indent:

when you have multiline if statement with comment at the end, next line
indent is doubled.

If I have js-indent-level equal 8 the code look like this:

            if (x > left && x < left + image.width &&
                y > top && y < top + image.height) {
                    do_somethig();
            }

but when I put comment after if it look like this:

            if (x > left && x < left + image.width &&
                y > top && y < top + image.height) {  // found
                            do_somethig();

when js-indent-level is 2 it have 4 spaces. The same is with while

          while (10 &&
                 20) { // asd
              xx();

four spaces instead of two

version: GNU Emacs 24.2.1

--
Jakub Jankiewicz, Web Developer
http://jcubic.pl