[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#5586: 188.8.131.52; Electric indentation and hungry backspace deletion
Sun, 28 Mar 2010 16:58:49 -0400
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:184.108.40.206) Gecko/20100227 Thunderbird/3.0.3
-----BEGIN PGP SIGNED MESSAGE-----
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.
> 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
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)
-----END PGP SIGNATURE-----