GNU bug report logs - #5586
23.1.92.1; Electric indentation and hungry backspace deletion in JavaScript mode (js-mode)

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Paul Pogonyshev <pogonyshev@HIDDEN>; dated Tue, 16 Feb 2010 22:34:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 5586 <at> debbugs.gnu.org:


Received: (at 5586) by debbugs.gnu.org; 29 Mar 2010 01:49:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 28 21:49:46 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Nw46s-0001Ui-5v
	for submit <at> debbugs.gnu.org; Sun, 28 Mar 2010 21:49:46 -0400
Received: from ironport2-out.teksavvy.com ([206.248.154.183]
	helo=ironport2-out.pppoe.ca)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <monnier@HIDDEN>) id 1Nw46r-0001Ua-2y
	for 5586 <at> debbugs.gnu.org; Sun, 28 Mar 2010 21:49:45 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AvsEAGOkr0tMCqeD/2dsb2JhbACbKXK+MYUBBIse
X-IronPort-AV: E=Sophos;i="4.51,325,1267419600"; d="scan'208";a="59567392"
Received: from 76-10-167-131.dsl.teksavvy.com (HELO ceviche.home)
	([76.10.167.131])
	by ironport2-out.pppoe.ca with ESMTP; 28 Mar 2010 21:49:40 -0400
Received: by ceviche.home (Postfix, from userid 20848)
	id A5927660BF; Sun, 28 Mar 2010 21:49:40 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Daniel Colascione <dan.colascione@HIDDEN>
Subject: Re: bug#5586: 23.1.92.1;
	Electric indentation and hungry backspace deletion in JavaScript mode
	(js-mode)
Message-ID: <jwvvdcfj3tt.fsf-monnier+emacs@HIDDEN>
References: <87aatsuqbu.fsf@HIDDEN> <4BAFC309.70701@HIDDEN>
Date: Sun, 28 Mar 2010 21:49:40 -0400
In-Reply-To: <4BAFC309.70701@HIDDEN> (Daniel Colascione's message of "Sun, 
	28 Mar 2010 16:58:49 -0400")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Score: -2.0 (--)
X-Debbugs-Envelope-To: 5586
Cc: Chong Yidong <cyd@HIDDEN>, 5586 <at> debbugs.gnu.org,
	Paul Pogonyshev <pogonyshev@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.0 (--)

> At best, modes would have to opt-in, and if each mode needs some glue
> anyway, why not just let each mode handle electric characters itself?

For one, it would allow users to turn it on/off globally rather than
having to do it for every mode.  Also every mode shouldn't have to
reinvent it.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5586; Package emacs. Full text available.

Message received at 5586 <at> debbugs.gnu.org:


Received: (at 5586) by debbugs.gnu.org; 28 Mar 2010 22:37:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 28 18:37:50 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Nw178-0000Jh-B7
	for submit <at> debbugs.gnu.org; Sun, 28 Mar 2010 18:37:50 -0400
Received: from fg-out-1718.google.com ([72.14.220.153])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <lennart.borgman@HIDDEN>) id 1Nw176-0000Jc-Q4
	for 5586 <at> debbugs.gnu.org; Sun, 28 Mar 2010 18:37:49 -0400
Received: by fg-out-1718.google.com with SMTP id d23so2354214fga.15
	for <5586 <at> debbugs.gnu.org>; Sun, 28 Mar 2010 15:37:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:in-reply-to:references
	:from:date:received:message-id:subject:to:cc:content-type;
	bh=wQ2L+ItjFBw3EiSZ7sfUXMmvoLiPF9cK9roSd/mo57s=;
	b=Ff+BWx+/s3gJqU0aQyf+iyp+FWm1xO8N9PrPC2s6F+IfWbcFq6yhhkinLc0cVBa7OV
	aRL37V2c3NR1xzqCHjphA6cgqxgLsXlKvArTL7TDa/K5bx32qgBWX5paMxjZIMKOr7lv
	ZdSAoZ2/M2oFf4mm8Htk+6yXII7/FtvbuJCnY=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to
	:cc:content-type;
	b=jmHF2H8QChmRN9JvigEHkhKJ5YNJw0fNrcxjIy4mNlP4VX/3GTmUFwSzoRZky1AYL9
	WQZ+k7u6IckehoDwknePCo9yR9M0PRNNAT9wKL9Ab9+NVML2TAIZZUXsjCzOxHpV9mLY
	rC2ylJVK/8ZY2W3UdUC0fSyxlyfupj8eWFpVY=
MIME-Version: 1.0
Received: by 10.239.169.18 with HTTP; Sun, 28 Mar 2010 15:37:24 -0700 (PDT)
In-Reply-To: <4BAFC309.70701@HIDDEN>
References: <87aatsuqbu.fsf@HIDDEN> <4BAFC309.70701@HIDDEN>
From: Lennart Borgman <lennart.borgman@HIDDEN>
Date: Mon, 29 Mar 2010 00:37:24 +0200
Received: by 10.239.132.204 with SMTP id 12mr364232hbs.128.1269815864227; Sun, 
	28 Mar 2010 15:37:44 -0700 (PDT)
Message-ID: <e01d8a51003281537o6777dc25k3f49c7ac4dc0235@HIDDEN>
Subject: Re: bug#5586: 23.1.92.1; Electric indentation and hungry backspace 
	deletion in JavaScript mode (js-mode)
To: Daniel Colascione <dan.colascione@HIDDEN>
Content-Type: text/plain; charset=UTF-8
X-Spam-Score: -3.0 (---)
X-Debbugs-Envelope-To: 5586
Cc: Chong Yidong <cyd@HIDDEN>, 5586 <at> debbugs.gnu.org,
	Paul Pogonyshev <pogonyshev@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.0 (---)

On Sun, Mar 28, 2010 at 10:58 PM, Daniel Colascione
<dan.colascione@HIDDEN> wrote:
>
> The chief difficulty I see is that in some modes, indentation isn't
> idempotent: if you ran indent-line-function from some generic electric
> code, it might change the indentation of the current line in unwanted
> ways. (Imagine python-mode, where indent-line-function cycles through
> feasible indentation levels for a given line.)
>
> At best, modes would have to opt-in, and if each mode needs some glue
> anyway, why not just let each mode handle electric characters itself?


Because without something like indent-line-function you can not handle
it in a more generic way.

The absense of this in some major modes has for example costed me a
lot of burden in mumamo (the framework in nXhtml for mult major modes
in a buffer). Actually indent-line-function is not generic enough. One
more level is needed: one that computes the desirable indentation.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5586; Package emacs. Full text available.

Message received at 5586 <at> debbugs.gnu.org:


Received: (at 5586) by debbugs.gnu.org; 28 Mar 2010 20:59:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 28 16:59:18 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NvzZl-00089p-O9
	for submit <at> debbugs.gnu.org; Sun, 28 Mar 2010 16:59:18 -0400
Received: from qw-out-2122.google.com ([74.125.92.25])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <dan.colascione@HIDDEN>) id 1NvzZj-00089E-T5
	for 5586 <at> debbugs.gnu.org; Sun, 28 Mar 2010 16:59:16 -0400
Received: by qw-out-2122.google.com with SMTP id 8so2889838qwh.33
	for <5586 <at> debbugs.gnu.org>; Sun, 28 Mar 2010 13:59:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:message-id:date:from
	:user-agent:mime-version:to:cc:subject:references:in-reply-to
	:x-enigmail-version:content-type:content-transfer-encoding;
	bh=sjUtMb7kTNGiPUwIr4fYlqUO3z+0QklqrgBZUYDucog=;
	b=Wg0e0P/i/nSm0Tp7GxqLeZq0b9HJYfhFTprGqjxYOpHmWccqD7t6DdIFF7iXLV1M54
	ePFXnINRp138OVwJpya8mZSs0X1kJbgpo2bce1mV4UuzYAvhYQbwJZQvIbcL5tpA7Rtr
	5WeE8ElrOLtFR0/1U8I4/LgiOHdKskWIin0Ic=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=message-id:date:from:user-agent:mime-version:to:cc:subject
	:references:in-reply-to:x-enigmail-version:content-type
	:content-transfer-encoding;
	b=MJJk29rTTQdQuOFryY+wJdDMB0fYObccfsjfF6ySAJbwzy72ywqcuggqvynCRcnWC7
	U3sQsf9gLS8084XujCGPVwRppEhZe3sJBM9aSVoGbOdINOeVTkVdYL5AiFeFV73hMwm3
	tBgaTQbsN7MCukq3vETiGyPGYzFHy3O4OXE0I=
Received: by 10.229.230.84 with SMTP id jl20mr1830707qcb.88.1269809956824;
	Sun, 28 Mar 2010 13:59:16 -0700 (PDT)
Received: from edith.local (cpe-67-247-228-249.buffalo.res.rr.com
	[67.247.228.249])
	by mx.google.com with ESMTPS id 22sm2107401qyk.10.2010.03.28.13.59.15
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Sun, 28 Mar 2010 13:59:15 -0700 (PDT)
Message-ID: <4BAFC322.7080104@HIDDEN>
Date: Sun, 28 Mar 2010 16:59:14 -0400
From: Daniel Colascione <dan.colascione@HIDDEN>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US;
	rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3
MIME-Version: 1.0
To: Chong Yidong <cyd@HIDDEN>
Subject: Re: bug#5586: 23.1.92.1; Electric indentation and hungry backspace
	deletion in JavaScript mode (js-mode)
References: <87aatsuqbu.fsf@HIDDEN>
In-Reply-To: <87aatsuqbu.fsf@HIDDEN>
X-Enigmail-Version: 1.0.1
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 5586
Cc: 5586 <at> debbugs.gnu.org, Paul Pogonyshev <pogonyshev@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.1 (--)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 3/28/10 4:46 PM, Chong Yidong wrote:
> I am still not happy about the way it's implemented in either mode---I
> think Emacs needs some kind of centralized mechanism for this---but that
> is a longer-term project.  

The chief difficulty I see is that in some modes, indentation isn't
idempotent: if you ran indent-line-function from some generic electric
code, it might change the indentation of the current line in unwanted
ways. (Imagine python-mode, where indent-line-function cycles through
feasible indentation levels for a given line.)

At best, modes would have to opt-in, and if each mode needs some glue
anyway, why not just let each mode handle electric characters itself?

> In the meantime, I've restored the deleted
> code in the branch.

Thanks.

> One difference, however, is that espresso-mode did electric punctuation
> for `+-.'.  I didn't restore this yet, since CC mode does not do
> electric punctuation for these characters.  Is there any reason we need
> to do this specially for Javascript?

There's no particular reason, no. The cc-mode set of electric characters
is probably fine.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)

iEYEARECAAYFAkuvwyIACgkQ17c2LVA10VtH3gCeOCAeJGGzWDM1NATJ5HzOakbJ
Ix8Ani2twtZPGkUe0G8uQs5v+w0XQmjx
=1shD
-----END PGP SIGNATURE-----




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5586; Package emacs. Full text available.

Message received at 5586 <at> debbugs.gnu.org:


Received: (at 5586) by debbugs.gnu.org; 28 Mar 2010 20:58:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 28 16:58:59 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NvzZT-00089J-7E
	for submit <at> debbugs.gnu.org; Sun, 28 Mar 2010 16:58:59 -0400
Received: from qw-out-2122.google.com ([74.125.92.25])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <dan.colascione@HIDDEN>) id 1NvzZR-00089E-CW
	for 5586 <at> debbugs.gnu.org; Sun, 28 Mar 2010 16:58:57 -0400
Received: by qw-out-2122.google.com with SMTP id 8so2889838qwh.33
	for <5586 <at> debbugs.gnu.org>; Sun, 28 Mar 2010 13:58:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:message-id:date:from
	:user-agent:mime-version:to:cc:subject:references:in-reply-to
	:x-enigmail-version:content-type:content-transfer-encoding;
	bh=gYTwW6UWnvlKZjOjO6i7Fr6exoqswZKyhVYfTre09oA=;
	b=WBYqfjOmTfkdmz8ZI1CSWTJBeKm2TKyUzdXvaJF+26ZvkOF1aTLoUXaHSDkdjSr5If
	x38NVNRabHViWYPm7eXdIM3c77mnNWa/tGCvGQR8ZGbx3iyeQF9Lli9BPgUtXOBH1YA8
	AKVAVdkRPjL61AmxyHTP6Mr9qLVttkp3cVZyQ=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=message-id:date:from:user-agent:mime-version:to:cc:subject
	:references:in-reply-to:x-enigmail-version:content-type
	:content-transfer-encoding;
	b=eIuKnCgVlOwrLDNyShl0SSJcAZxW6VkwIXS4BiHgKdg2AFuEwKRL8R3etMkOdO9rXz
	Y59S3CpVZZIJgGiArCZrc0/pCs2oZ7dpewJRLVla4ii1Oxmk1472df0gzrQh28+z9bSl
	0rv+hJ6aMjFY3+dwbEPcQrUDhHsMRl/AKogtQ=
Received: by 10.224.96.226 with SMTP id i34mr1311826qan.1.1269809932933;
	Sun, 28 Mar 2010 13:58:52 -0700 (PDT)
Received: from edith.local (cpe-67-247-228-249.buffalo.res.rr.com
	[67.247.228.249])
	by mx.google.com with ESMTPS id 22sm2114503qyk.2.2010.03.28.13.58.50
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Sun, 28 Mar 2010 13:58:51 -0700 (PDT)
Message-ID: <4BAFC309.70701@HIDDEN>
Date: Sun, 28 Mar 2010 16:58:49 -0400
From: Daniel Colascione <dan.colascione@HIDDEN>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US;
	rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3
MIME-Version: 1.0
To: Chong Yidong <cyd@HIDDEN>
Subject: Re: bug#5586: 23.1.92.1; Electric indentation and hungry backspace
	deletion in JavaScript mode (js-mode)
References: <87aatsuqbu.fsf@HIDDEN>
In-Reply-To: <87aatsuqbu.fsf@HIDDEN>
X-Enigmail-Version: 1.0.1
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 5586
Cc: 5586 <at> debbugs.gnu.org, Paul Pogonyshev <pogonyshev@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.7 (-)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 3/28/10 4:46 PM, Chong Yidong wrote:
> I am still not happy about the way it's implemented in either mode---I
> think Emacs needs some kind of centralized mechanism for this---but that
> is a longer-term project.  

The chief difficulty I see is that in some modes, indentation isn't
idempotent: if you ran indent-line-function from some generic electric
code, it might change the indentation of the current line in unwanted
ways. (Imagine python-mode, where indent-line-function cycles through
feasible indentation levels for a given line.)

At best, modes would have to opt-in, and if each mode needs some glue
anyway, why not just let each mode handle electric characters itself?

> In the meantime, I've restored the deleted
> code in the branch.

Thanks.

> One difference, however, is that espresso-mode did electric punctuation
> for `+-.'.  I didn't restore this yet, since CC mode does not do
> electric punctuation for these characters.  Is there any reason we need
> to do this specially for Javascript?

There's no particular reason, no. The cc-mode set of electric characters
is probably fine.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)

iEYEARECAAYFAkuvwwkACgkQ17c2LVA10VtXIACgmgSYoR4WMmxkOF4l7QoEATYQ
b8oAoNwNRjoQvMSkmd6gWIyNy/8IZBnW
=8XTU
-----END PGP SIGNATURE-----




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5586; Package emacs. Full text available.

Message received at 5586 <at> debbugs.gnu.org:


Received: (at 5586) by debbugs.gnu.org; 28 Mar 2010 20:46:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 28 16:46:52 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NvzNk-00084g-KW
	for submit <at> debbugs.gnu.org; Sun, 28 Mar 2010 16:46:52 -0400
Received: from pantheon-po35.its.yale.edu ([130.132.50.83])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <cyd@HIDDEN>) id 1NvzNh-00084a-SK
	for 5586 <at> debbugs.gnu.org; Sun, 28 Mar 2010 16:46:50 -0400
Received: from furry (173-14-147-246-NewEngland.hfc.comcastbusiness.net
	[173.14.147.246]) (authenticated bits=0)
	by pantheon-po35.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id
	o2SKkjuG024619
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);
	Sun, 28 Mar 2010 16:46:45 -0400
Received: by furry (Postfix, from userid 1000)
	id 5B934C05D; Sun, 28 Mar 2010 16:46:45 -0400 (EDT)
From: Chong Yidong <cyd@HIDDEN>
To: Daniel Colascione <dan.colascione@HIDDEN>
Subject: Re: bug#5586: 23.1.92.1;
	Electric indentation and hungry backspace deletion in JavaScript mode
	(js-mode)
Date: Sun, 28 Mar 2010 16:46:45 -0400
Message-ID: <87aatsuqbu.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed)
X-Spam-Score: -2.1 (--)
X-Debbugs-Envelope-To: 5586
Cc: 5586 <at> debbugs.gnu.org, Paul Pogonyshev <pogonyshev@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.0 (---)

> espresso-mode actually had electric indentation when I submitted it
> for inclusion in Emacs. Can we restore that functionality?

You're right, it was a mistake to take that out, since CC mode also has
electric punctuation.

I am still not happy about the way it's implemented in either mode---I
think Emacs needs some kind of centralized mechanism for this---but that
is a longer-term project.  In the meantime, I've restored the deleted
code in the branch.

One difference, however, is that espresso-mode did electric punctuation
for `+-.'.  I didn't restore this yet, since CC mode does not do
electric punctuation for these characters.  Is there any reason we need
to do this specially for Javascript?




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5586; Package emacs. Full text available.

Message received at 5586 <at> debbugs.gnu.org:


Received: (at 5586) by debbugs.gnu.org; 26 Mar 2010 06:15:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 26 02:15:11 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Nv2p4-00017W-R7
	for submit <at> debbugs.gnu.org; Fri, 26 Mar 2010 02:15:11 -0400
Received: from qw-out-2122.google.com ([74.125.92.24])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <dan.colascione@HIDDEN>) id 1Nv1hM-0000hf-Ds
	for 5586 <at> debbugs.gnu.org; Fri, 26 Mar 2010 01:03:09 -0400
Received: by qw-out-2122.google.com with SMTP id 8so2413315qwh.33
	for <5586 <at> debbugs.gnu.org>; Thu, 25 Mar 2010 22:03:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:message-id:date:from
	:user-agent:mime-version:newsgroups:to:cc:subject:references
	:in-reply-to:x-enigmail-version:content-type
	:content-transfer-encoding;
	bh=GEwA/fgZFoL+mtNO1j5QaWZX+mHgvo4wkneWw8QhdUM=;
	b=eFywdOpG5Xz7Ir8/2Mv4/k05x6d5DKlBD+DT47L7DsQ0prH/0XYiD/SqAg+iAUgsG/
	x8x2CiF/L27onL0AqYpDPXvb6327y3f2OBlXUkII/8wcR6H+Jp2LEqkRiyuXYW4tQHit
	VoyFe/Q3Qzw3aNjcr+IJt0/uQg0nfChOKGXEw=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=message-id:date:from:user-agent:mime-version:newsgroups:to:cc
	:subject:references:in-reply-to:x-enigmail-version:content-type
	:content-transfer-encoding;
	b=PBL0zZDD4DN+m7ApZwbaTab1CJwlVbzZzzrWnw1gKfm1IczRD++FIziyK733g5zf2t
	0NrHa/e5KaH542m59tHp6jRuUQpHRI4kBiZj7NOLRI+4t9BbssH7/AbYmyqtbvKJAQMl
	bHdblNnqBONOgyJgXpW6onf6tAgstU/T2Ryeg=
Received: by 10.229.214.74 with SMTP id gz10mr601365qcb.25.1269579784879;
	Thu, 25 Mar 2010 22:03:04 -0700 (PDT)
Received: from edith.local (cpe-67-247-228-249.buffalo.res.rr.com
	[67.247.228.249])
	by mx.google.com with ESMTPS id 20sm378895qyk.12.2010.03.25.22.03.03
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Thu, 25 Mar 2010 22:03:04 -0700 (PDT)
Message-ID: <4BAC4004.1090505@HIDDEN>
Date: Fri, 26 Mar 2010 01:03:00 -0400
From: Daniel Colascione <dan.colascione@HIDDEN>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US;
	rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3
MIME-Version: 1.0
Newsgroups: gmane.emacs.bugs
To: Paul Pogonyshev <pogonyshev@HIDDEN>
Subject: Re: bug#5586: 23.1.92.1; Electric indentation and hungry backspace
	deletion in JavaScript mode (js-mode)
References: <201002170031.46472.pogonyshev@HIDDEN>
In-Reply-To: <201002170031.46472.pogonyshev@HIDDEN>
X-Enigmail-Version: 1.0.1
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 5586
X-Mailman-Approved-At: Fri, 26 Mar 2010 02:15:09 -0400
Cc: 5586 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.3 (-)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2/16/10 5:31 PM, Paul Pogonyshev wrote:
> Package: emacs
> Severity: wishlist
> 
> JavaScript is quite similar in syntax to C-like languages (Java, C++
> etc.), so it's natural to use the same editing techniques for it.  It
> would be nice if Emacs gave JS mode a more "familiar" feel.
> 
> For me, the most wanted features are electric indentation and hungry
> backspace.  I.e. when typing '{', '(' or a similar control character
> the current line would be automatically reindented.  And backspace
> would delete all space characters to the left of the point, not just
> one.
> 
> Paul

espresso-mode actually had electric indentation when I submitted it for
inclusion in Emacs. Can we restore that functionality?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)

iEYEARECAAYFAkusQAQACgkQ17c2LVA10VsA1ACeMwZPtnZnw3aEm3B6/sb+8A5T
hhAAnjM99lr4a5arx69ehVxBM/sv9n6P
=trl7
-----END PGP SIGNATURE-----




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5586; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 16 Feb 2010 22:33:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 16 17:33:58 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NhVzS-0001rG-0C
	for submit <at> debbugs.gnu.org; Tue, 16 Feb 2010 17:33:58 -0500
Received: from fencepost.gnu.org ([140.186.70.10])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <pogonyshev@HIDDEN>) id 1NhVym-0001qZ-6q
	for submit <at> debbugs.gnu.org; Tue, 16 Feb 2010 17:33:16 -0500
Received: from mx10.gnu.org ([199.232.76.166]:37746)
	by fencepost.gnu.org with esmtp (Exim 4.69)
	(envelope-from <pogonyshev@HIDDEN>) id 1NhVyi-0005fl-6t
	for submit <at> debbugs.gnu.org; Tue, 16 Feb 2010 17:33:12 -0500
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim
	4.60) (envelope-from <pogonyshev@HIDDEN>) id 1NhVyh-0004an-DT
	for submit <at> debbugs.gnu.org; Tue, 16 Feb 2010 17:33:12 -0500
X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on monty-python
X-Spam-Level: ****
X-Spam-Status: No, score=4.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_XBL,
	UNPARSEABLE_RELAY autolearn=no version=3.1.0
Received: from lists.gnu.org ([199.232.76.165]:37966)
	by monty-python.gnu.org with esmtps
	(TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60)
	(envelope-from <pogonyshev@HIDDEN>) id 1NhVyh-0004aj-7V
	for submit <at> debbugs.gnu.org; Tue, 16 Feb 2010 17:33:11 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NhVyg-0002nv-Q5
	for bug-gnu-emacs@HIDDEN; Tue, 16 Feb 2010 17:33:10 -0500
Received: from [140.186.70.92] (port=36342 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NhVyg-0002nK-50
	for bug-gnu-emacs@HIDDEN; Tue, 16 Feb 2010 17:33:10 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <pogonyshev@HIDDEN>) id 1NhVyd-0007wl-Tl
	for bug-gnu-emacs@HIDDEN; Tue, 16 Feb 2010 17:33:10 -0500
Received: from mail.gmx.net ([213.165.64.20]:59206)
	by eggs.gnu.org with smtp (Exim 4.69)
	(envelope-from <pogonyshev@HIDDEN>) id 1NhVyd-0007wb-FZ
	for bug-gnu-emacs@HIDDEN; Tue, 16 Feb 2010 17:33:07 -0500
Received: (qmail invoked by alias); 16 Feb 2010 22:33:04 -0000
Received: from unknown (EHLO gonzo.localnet) [91.149.173.2]
	by mail.gmx.net (mp015) with SMTP; 16 Feb 2010 23:33:04 +0100
X-Authenticated: #16844820
X-Provags-ID: V01U2FsdGVkX18Tg7xQfz8Tp275iuSHHi1+dsXVCnI5aLecQmK3TA
	kb4e5gjD3FJX6I
From: Paul Pogonyshev <pogonyshev@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 23.1.92.1;
	Electric indentation and hungry backspace deletion in JavaScript mode
	(js-mode)
Date: Wed, 17 Feb 2010 00:31:45 +0200
User-Agent: KMail/1.12.4 (Linux/2.6.29-2-686; KDE/4.3.4; i686; ; )
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-Id: <201002170031.46472.pogonyshev@HIDDEN>
X-Y-GMX-Trusted: 0
X-FuHaFi: 0.68000000000000005
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6,
	seldom 2.4 (older, 4)
X-Spam-Score: -3.3 (---)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Tue, 16 Feb 2010 17:33:56 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.3 (---)

Package: emacs
Severity: wishlist

JavaScript is quite similar in syntax to C-like languages (Java, C++
etc.), so it's natural to use the same editing techniques for it.  It
would be nice if Emacs gave JS mode a more "familiar" feel.

For me, the most wanted features are electric indentation and hungry
backspace.  I.e. when typing '{', '(' or a similar control character
the current line would be automatically reindented.  And backspace
would delete all space characters to the left of the point, not just
one.

Paul





Acknowledgement sent to Paul Pogonyshev <pogonyshev@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5586; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.