From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Electricity Date: Thu, 07 Oct 2010 12:36:31 +0200 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1286447809 11014 80.91.229.12 (7 Oct 2010 10:36:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 7 Oct 2010 10:36:49 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 07 12:36:48 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P3nqC-0002y1-6y for ged-emacs-devel@m.gmane.org; Thu, 07 Oct 2010 12:36:48 +0200 Original-Received: from localhost ([127.0.0.1]:52601 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P3nqB-0005E6-Jv for ged-emacs-devel@m.gmane.org; Thu, 07 Oct 2010 06:36:47 -0400 Original-Received: from [140.186.70.92] (port=39505 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P3nq0-0005DB-Q4 for emacs-devel@gnu.org; Thu, 07 Oct 2010 06:36:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P3npy-0006mu-Cp for emacs-devel@gnu.org; Thu, 07 Oct 2010 06:36:36 -0400 Original-Received: from smtp09.smtpout.orange.fr ([80.12.242.131]:34618 helo=smtp.smtpout.orange.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P3npy-0006me-5o for emacs-devel@gnu.org; Thu, 07 Oct 2010 06:36:34 -0400 Original-Received: from fmsmemgm.homelinux.net ([92.140.114.212]) by mwinf5d17 with ME id FmcY1f0024b1Gto03mcYTl; Thu, 07 Oct 2010 12:36:32 +0200 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id C683FAE517; Thu, 7 Oct 2010 12:36:31 +0200 (CEST) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Linux 2.6? (barebone, rare!) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:131423 Archived-At: 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