From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#8576: 23.2; js-mode doesn't support multi-line variable declarations Date: Tue, 17 Jul 2012 08:21:27 +0400 Message-ID: <5004E847.2070000@yandex.ru> References: <4DB915B0.7010605@ubercode.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1342498992 12620 80.91.229.3 (17 Jul 2012 04:23:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 17 Jul 2012 04:23:12 +0000 (UTC) Cc: 8576@debbugs.gnu.org To: fhd@ubercode.de Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 17 06:23:11 2012 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 1SqzJW-0001G6-Qb for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Jul 2012 06:23:10 +0200 Original-Received: from localhost ([::1]:56000 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqzJV-0008RL-Pp for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Jul 2012 00:23:09 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56616) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqzJS-0008R3-7l for bug-gnu-emacs@gnu.org; Tue, 17 Jul 2012 00:23:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SqzJQ-0003Lo-RC for bug-gnu-emacs@gnu.org; Tue, 17 Jul 2012 00:23:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35441) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqzJQ-0003LE-IO for bug-gnu-emacs@gnu.org; Tue, 17 Jul 2012 00:23:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SqzPC-0007MC-7o for bug-gnu-emacs@gnu.org; Tue, 17 Jul 2012 00:29:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <4DB915B0.7010605@ubercode.de> Resent-From: Dmitry Gutov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Jul 2012 04:29: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.134249928428204 (code B ref 8576); Tue, 17 Jul 2012 04:29:02 +0000 Original-Received: (at 8576) by debbugs.gnu.org; 17 Jul 2012 04:28:04 +0000 Original-Received: from localhost ([127.0.0.1]:44986 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SqzOC-0007KU-1r for submit@debbugs.gnu.org; Tue, 17 Jul 2012 00:28:03 -0400 Original-Received: from forward19.mail.yandex.net ([95.108.253.144]:59727) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SqzO7-0007KK-Nk for 8576@debbugs.gnu.org; Tue, 17 Jul 2012 00:27:58 -0400 Original-Received: from smtp18.mail.yandex.net (smtp18.mail.yandex.net [95.108.252.18]) by forward19.mail.yandex.net (Yandex) with ESMTP id 8C7C91120943; Tue, 17 Jul 2012 08:21:26 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1342498886; bh=pZecC0yZxJW/SArhphiol67LbrV4oxiTEUE3vz9gp9w=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:Content-Type: Content-Transfer-Encoding; b=OKS3aB33+IFgQNkhuH+/PIGvC6LfQt51TO5INeEQbcVcDOjwGhSC1IGrUPh4iYRcP j0HX3mwql8V69W2qpIq54dhY+Ldk1t6GWtqnqL1acq9Pco1hdihF1JoT4PjlD9jxec maBgd5GqbXgpepBb5ALe30Q51OXube+cWhvjZmZI= Original-Received: from smtp18.mail.yandex.net (localhost [127.0.0.1]) by smtp18.mail.yandex.net (Yandex) with ESMTP id 695FF18A01D5; Tue, 17 Jul 2012 08:21:26 +0400 (MSK) Original-Received: from 98-87.nwlink.spb.ru (98-87.nwlink.spb.ru [178.252.98.87]) by smtp18.mail.yandex.net (nwsmtp/Yandex) with ESMTP id LQVaQOe8-LQVm3mvT; Tue, 17 Jul 2012 08:21:26 +0400 X-Yandex-Rcpt-Suid: fhd@ubercode.de X-Yandex-Rcpt-Suid: 8576@debbugs.gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1342498886; bh=pZecC0yZxJW/SArhphiol67LbrV4oxiTEUE3vz9gp9w=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: Content-Type:Content-Transfer-Encoding; b=TwlXB/4RHknvIji2agtZZX/K9ceJH/G5mkESdU/5jrTlApYeCwYxL1puJDTpGlfca CQXu7vq3SXfi3OCTS2uJW2xSHmAN0i01CWkvpFpODltOCc0Lm5Yn3rJn6GcX/vHEyx W1CR/IQeUUCx3xCHP9QI0YL8HmbjE6t5MS8sZzLA= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 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:62018 Archived-At: "Felix H. Dahlke" writes: > I tried some things but couldn't really make it work like I wanted. > So I decided to just improve the patch a bit. I am now using the > proper indentation which also fixes the issue reported by jaseemabid. Yes, that's a bit better than my fix. You shouldn't add the `js--indent-operator-re' constant, though, it's already present in js-mode. > The only solution I can think of would be to go back up after typing a > closing brace followed by a comma and indent the preceeding lines. > Some modes do that, but it would require drastic changes to js.el. > I'd rather get this patch in first and see if the issue annoys me (or > anyone else) enough to work further on this. I don't think this will be much of a problem. There is an alternative approach, though: one js2-mode user requested that when the first value in the declaration is a function/object/array, it should always be indented: https://github.com/mooz/js2-mode/issues/3 That option probably won't be very popular. --Dmitry