GNU bug report logs -
#5586
23.1.92.1; Electric indentation and hungry backspace deletion in JavaScript mode (js-mode)
Previous Next
Full log
View this message in rfc822 format
-----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-----
This bug report was last modified 3 years and 111 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.