all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lennart Borgman <lennart.borgman@gmail.com>
To: Daniel Colascione <danc@merrillprint.com>
Cc: Chong Yidong <cyd@stupidchicken.com>, emacs-devel@gnu.org
Subject: Re: Electric indentation (Was: Re: js.el changes)
Date: Fri, 21 Aug 2009 18:22:58 +0200	[thread overview]
Message-ID: <e01d8a50908210922v10ae64acsab2bfc64cef86286@mail.gmail.com> (raw)
In-Reply-To: <200908211218.28208.danc@merrillprint.com>

On Fri, Aug 21, 2009 at 6:18 PM, Daniel Colascione<danc@merrillprint.com> wrote:
> On Friday 14 August 2009, you wrote:
>> 4. I removed the "electric indentation" feature implemented by
>> js-auto-indent-flag and js-insert-and-indent.  I appreciate the intent,
>> but it's not consistent with the way the other programming modes work,
>> and this behavior should be implemented separately---as a minor mode
>> that can be used generally.  Feel free to suggest this on emacs-devel.
>
> I agree that a generic toggle switch for electric indentation would be nice. However, there's quite a bit of precedent for modes implementing their own electric indentation, often using complex logic (see c-electric-brace).
>
> To me, the simplest option would be to create a new trivial minor mode, electric-indentation-mode, and modify all current mode-specific indentation code to check that mode's flag instead of relying on something mode-specific like js-auto-indent-flag or c-electric-flag. The actual mode-specific indentation can survive otherwise unchanged.


Maybe it could be done similar to indent-line-function etc?




  reply	other threads:[~2009-08-21 16:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87y6plkhj6.fsf@stupidchicken.com>
2009-08-21 16:18 ` Electric indentation (Was: Re: js.el changes) Daniel Colascione
2009-08-21 16:22   ` Lennart Borgman [this message]
     [not found] ` <200908211228.17606.danc@merrillprint.com>
     [not found]   ` <e01d8a50908210930l5677cb86jb63c21632b1ac1a3@mail.gmail.com>
2009-08-21 16:35     ` Daniel Colascione
2009-08-21 16:42       ` Lennart Borgman

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=e01d8a50908210922v10ae64acsab2bfc64cef86286@mail.gmail.com \
    --to=lennart.borgman@gmail.com \
    --cc=cyd@stupidchicken.com \
    --cc=danc@merrillprint.com \
    --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.