From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jakub Jankiewicz Newsgroups: gmane.emacs.bugs Subject: bug#15582: js-mode indent bug Date: Thu, 10 Oct 2013 14:06:48 +0200 Message-ID: <20131010140648.2d3d1c4a@jcubic> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/A3KcM7NXVoT=VvE7iDsYk1q"; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1381408765 29665 80.91.229.3 (10 Oct 2013 12:39:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Oct 2013 12:39:25 +0000 (UTC) To: 15582@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 10 14:39:29 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VUFWT-0004Mu-PV for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 Oct 2013 14:39:22 +0200 Original-Received: from localhost ([::1]:46797 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUFWT-0008Qk-1B for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 Oct 2013 08:39:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60912) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUFWJ-0008Go-L3 for bug-gnu-emacs@gnu.org; Thu, 10 Oct 2013 08:39:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VUFWA-0002Oh-FW for bug-gnu-emacs@gnu.org; Thu, 10 Oct 2013 08:39:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59943) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUFWA-0002OZ-CH for bug-gnu-emacs@gnu.org; Thu, 10 Oct 2013 08:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VUFWA-0004Kt-4S for bug-gnu-emacs@gnu.org; Thu, 10 Oct 2013 08:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jakub Jankiewicz Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Oct 2013 12:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 15582 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.138140871216601 (code B ref -1); Thu, 10 Oct 2013 12:39:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 10 Oct 2013 12:38:32 +0000 Original-Received: from localhost ([127.0.0.1]:39992 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VUFVg-0004Jg-C4 for submit@debbugs.gnu.org; Thu, 10 Oct 2013 08:38:32 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58948) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VUFVd-0004JW-NE for submit@debbugs.gnu.org; Thu, 10 Oct 2013 08:38:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VUFVY-0002GO-33 for submit@debbugs.gnu.org; Thu, 10 Oct 2013 08:38:29 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:57432) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUFVY-0002GK-01 for submit@debbugs.gnu.org; Thu, 10 Oct 2013 08:38:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60647) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUFVS-0007eF-Rk for bug-gnu-emacs@gnu.org; Thu, 10 Oct 2013 08:38:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VUFVN-0002EZ-Nx for bug-gnu-emacs@gnu.org; Thu, 10 Oct 2013 08:38:18 -0400 Original-Received: from smtpo13.poczta.onet.pl ([213.180.142.144]:34746) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUFVN-0002EI-Ch for bug-gnu-emacs@gnu.org; Thu, 10 Oct 2013 08:38:13 -0400 Original-Received: from jcubic (atf96.neoplus.adsl.tpnet.pl [83.26.243.96]) (using SSLv3 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jcubic@onet.pl) by smtp.poczta.onet.pl (Onet) with ESMTPSA id 3cwWHw2ljBzZCl4R for ; Thu, 10 Oct 2013 14:07:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=onet.pl; s=2011; t=1381406828; bh=OxT6Esh5BsXdvc6KZBAzuwdXvNM1Si0EW9McVIYjt3o=; h=Date:From:To:Subject:Message-ID:Mime-Version:Content-Type; b=jIzB4bIzryOWf56sn8GLPlvIWF0maYkK2OZSAFlZGgX8Udx9XEsCOKng6UE9ga0Us jXKsXvZIHuD1MNFSDVKqqgNOWrurlLqAYIXCaTPDakYyOWv2thF58aQHDs9Wr5aK6o lRklGWGk2ZR2rCnnWTdwfNqccwP7UKWl0YSRO5/U= X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.17; x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:79144 Archived-At: --Sig_/A3KcM7NXVoT=VvE7iDsYk1q Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable 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 --Sig_/A3KcM7NXVoT=VvE7iDsYk1q Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQEcBAEBAgAGBQJSVphZAAoJEKWO5vEx+DATU10H/jODBJqpuBTZlmb6Bno2iv/U ZJZqCexk7yBFuqGirFSg61s5bENgGaRdU4s+6X21RMU+ShA/KQMZffNBRnAm3o4v LU1/DgmLPDv96RLnvS5G1aSNa91SsZZdaUAkG4uRA5ipvGwyVqFbENkh9y0I8pUt ZMGy1T4ITnlW+0Qia8ie9RLCtlcVHpiiBm9c4w+XFXQTRcLWhmmICqxXbeS7FDg7 8QBROGXCHdjFyV9lpQiL0bh1bdhBsfXAp5TdT1tzMqsU6QJDDIngphMys0O1BHmg RELbCermLlZWxu3ft0BEFyBAuYPJmOV/whxW2H3m37yDOYRctHtC5rII85RNWAk= =TGnG -----END PGP SIGNATURE----- --Sig_/A3KcM7NXVoT=VvE7iDsYk1q--