unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#15582: js-mode indent bug
@ 2013-10-10 12:06 Jakub Jankiewicz
  2017-01-10  5:03 ` bug#15582: notes on js-mode indentation bug Tom Tromey
  2017-01-14 17:45 ` bug#15582: done Tom Tromey
  0 siblings, 2 replies; 5+ messages in thread
From: Jakub Jankiewicz @ 2013-10-10 12:06 UTC (permalink / raw)
  To: 15582

[-- Attachment #1: Type: text/plain, Size: 850 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-01-16 16:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-10 12:06 bug#15582: js-mode indent bug Jakub Jankiewicz
2017-01-10  5:03 ` bug#15582: notes on js-mode indentation bug Tom Tromey
2017-01-14  3:51   ` Dmitry Gutov
2017-01-16 16:11     ` Tom Tromey
2017-01-14 17:45 ` bug#15582: done Tom Tromey

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).