emacs-devel
[Top][All Lists]
Advanced

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

Electricity


From: Stefan Monnier
Subject: Electricity
Date: Thu, 07 Oct 2010 12:36:31 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

For Emacs-24, one of the things I'd like to clean up is the "electric
key" mess.  Currently each and every major mode does it its own way,
making it difficult for users to enable/disable it.  I'd like to provide
a generic infrastructure for such features, such that major modes can
provide it in a standard way, and so that users can enable/disable it
globally rather than mode-by-mode.

I've recently added electric-indent-mode (as well as electric-pair-mode)
as a first step in that direction.

So there are two things left to do here:

- the main one: add support for electric-indent-mode to major modes (it
  can mean just to add a buffer-local setting for electric-indent-chars,
  but it may also mean to somehow disable the pre-existing ad-hoc
  electric-key code).

  I'm OK with breaking user-compatibility in the sense that I think
  major modes should not enable electric-indent-mode themselves, which
  means that modes that currently make some keys electric by default
  may see their behavior changed (depending on the default chosen for
  electric-indent-mode ;-)

- look for remaining forms of electric-keys and try and provide generic
  support for it (the addition/removal of newlines around special chars
  like { in C is one such example).

Patches welcome,


        Stefan



reply via email to

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