From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Electricity
Date: Thu, 07 Oct 2010 12:36:31 +0200 [thread overview]
Message-ID: <jwvocb6mh71.fsf-monnier+emacs@gnu.org> (raw)
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
next reply other threads:[~2010-10-07 10:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-07 10:36 Stefan Monnier [this message]
2010-10-08 7:03 ` Electricity Andreas Röhler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvocb6mh71.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.