From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Felix H. Dahlke" Newsgroups: gmane.emacs.bugs Subject: bug#8576: 23.2; js-mode doesn't support multi-line variable declarations Date: Wed, 15 Feb 2012 13:32:01 +0100 Message-ID: <4F3BA5C1.1080807@ubercode.de> References: <4DB915B0.7010605@ubercode.de> <4DFE5E2E.2040606@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig7F75698D536CE395A01D6C28" X-Trace: dough.gmane.org 1329325666 17782 80.91.229.3 (15 Feb 2012 17:07:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 15 Feb 2012 17:07:46 +0000 (UTC) Cc: 8576@debbugs.gnu.org, 8584@debbugs.gnu.org To: Daniel Colascione Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Feb 15 18:07:40 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RxiKS-000615-3m for geb-bug-gnu-emacs@m.gmane.org; Wed, 15 Feb 2012 18:07:40 +0100 Original-Received: from localhost ([::1]:51674 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RxiKI-0001AV-9Q for geb-bug-gnu-emacs@m.gmane.org; Wed, 15 Feb 2012 12:07:30 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:33195) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RxiKC-00018B-0A for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2012 12:07:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RxiK8-00031e-6Q for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2012 12:07:23 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38037) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RxiK8-00031a-4Q for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2012 12:07:20 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RxiLm-0002RX-OO for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2012 12:09:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Felix H. Dahlke" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 Feb 2012 17:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8576 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 8576-submit@debbugs.gnu.org id=B8576.13293257179336 (code B ref 8576); Wed, 15 Feb 2012 17:09:02 +0000 Original-Received: (at 8576) by debbugs.gnu.org; 15 Feb 2012 17:08:37 +0000 Original-Received: from localhost ([127.0.0.1]:41654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RxiLJ-0002QS-Bk for submit@debbugs.gnu.org; Wed, 15 Feb 2012 12:08:37 -0500 Original-Received: from vserver2179.vserver-on.de ([84.38.67.140]:44915) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rxe3r-0004fh-6x; Wed, 15 Feb 2012 07:34:21 -0500 Original-Received: from [192.168.1.6] (xdsl-84-44-155-123.netcologne.de [84.44.155.123]) (Authenticated sender: fhd@ubercode.de) by vserver2179.vserver-on.de (Postfix) with ESMTPSA id 3089420F0B8; Wed, 15 Feb 2012 13:32:34 +0100 (CET) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:9.0) Gecko/20111229 Thunderbird/9.0 In-Reply-To: <4DFE5E2E.2040606@gmail.com> X-Enigmail-Version: 1.3.4 X-Mailman-Approved-At: Wed, 15 Feb 2012 12:08:32 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:56919 Archived-At: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig7F75698D536CE395A01D6C28 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 06/19/2011 10:38 PM, Daniel Colascione wrote: > Hi Felix, >=20 > Thanks for the bug report. Hi Daniel, sorry for getting back so terribly late, I somehow failed to notice the email and didn't use Emacs for JS much in the past year. But I'm using js-mode intensively again from now on, so the issue has become important for me again. > Additionally, this construct is relatively rare; if you're going to > split variable declarations across several lines, you might as well use= > another "var". I disagree, it's a very popular style and I'm using it all the time. Many others do, look e.g. at the jQuery code: https://github.com/jquery/jquery/blob/master/src/core.js > Also, the existing highlighting has no ill effects: the > second declaration is just interpreted as an assignment, and the worst > part is a lack of font-lock-variable-name-face, not syntactic incoheren= ce. True, but it's still very irritating to have Emacs indent it incorrectly every time you insert/edit such a statement and having to manually fix the indentation. That's why I used other editors for JS in the past year, but I really want to use Emacs, so I'm back. > > I'll take patches, but for now, I think we should defer a solution to= > this issue until we have a more sophisticated and general highlighting > scheme. I did have a look at the code, but I'm not familiar with font-lock, so I couldn't fix it. But I'd be very happy to help with the more general highlighting scheme. --------------enig7F75698D536CE395A01D6C28 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk87pcgACgkQJc3crOgfbubpIACgkGU2sbfsGIKs9476nHkXPU0z BkQAnilu0xo7+CsyVCrrovqKzzQObjZX =NU7Q -----END PGP SIGNATURE----- --------------enig7F75698D536CE395A01D6C28--