bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#5586: 23.1.92.1; Electric indentation and hungry backspace deletion


From: Daniel Colascione
Subject: bug#5586: 23.1.92.1; Electric indentation and hungry backspace deletion in JavaScript mode (js-mode)
Date: Sun, 28 Mar 2010 16:59:14 -0400
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

-----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-----






reply via email to

[Prev in Thread] Current Thread [Next in Thread]