all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: auto indenting code blocks
Date: Sun, 14 Jun 2015 15:59:21 -0400	[thread overview]
Message-ID: <jwvk2v6kqp1.fsf-monnier+gnu.emacs.help@gnu.org> (raw)
In-Reply-To: mailman.4973.1434259496.904.help-gnu-emacs@gnu.org

> I do not believe it’s a smartparens bug. Its job in this context is to
> add a matching closing brace as soon as an opening brace is inserted.

> It’s not an electric-indent-mode bug, either. When a line break is
> inserted immediately before a closing brace, it reindents the closing
> brace according to the mode and style.

> What Sam and I want, however, is, with a single Enter keypress, to
> insert *two* line breaks, position the point between them, and indent
> everything nicely.

Indeed.  IIRC electric-pair-mode offers such a feature, and during its
implementation we considered other alternatives, including adding it via
electric-layout-mode which is arguably conceptually closer.


        Stefan


      parent reply	other threads:[~2015-06-14 19:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-13 10:40 auto indenting code blocks Sam Halliday
2015-06-13 11:25 ` Yuri Khan
2015-06-13 11:55   ` Michael Heerdegen
2015-06-13 13:14     ` Yuri Khan
2015-06-13 23:30       ` Michael Heerdegen
2015-06-14  5:24         ` Yuri Khan
     [not found]         ` <mailman.4973.1434259496.904.help-gnu-emacs@gnu.org>
2015-06-14 19:54           ` Sam Halliday
2015-06-14 19:59           ` Stefan Monnier [this message]

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=jwvk2v6kqp1.fsf-monnier+gnu.emacs.help@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=help-gnu-emacs@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.