unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: David Hansen <david.hansen@gmx.net>
Subject: Re: Vim like auto indent mode
Date: Wed, 19 May 2004 14:24:34 +0200	[thread overview]
Message-ID: <87vfisob99.fsf@robotron.ath.cx> (raw)
In-Reply-To: mailman.6202.1084952911.1061.help-gnu-emacs@gnu.org

On Wed, 19 May 2004 15:55:00 +0800 Ding Lei wrote:

> Under JDE/C++/C mode, Emacs will auto indent upon some symbols like an
> ending parenthess("{") or a semi-colon, but I really hope that it will
> auto indent immediately I press the return key.  

Is this doing what you want?

(add-hook 'c-mode-common-hook
          (lambda ()
            (define-key c-mode-map 
             "\C-m" 'reindent-then-newline-and-indent)))

I wonder why this isn't it the default in modes for programming
languages.

-- David

       reply	other threads:[~2004-05-19 12:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.6202.1084952911.1061.help-gnu-emacs@gnu.org>
2004-05-19 12:24 ` David Hansen [this message]
2004-05-20  8:20 ` Vim like auto indent mode Alan Mackenzie
2004-05-19  7:55 Ding Lei

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vfisob99.fsf@robotron.ath.cx \
    --to=david.hansen@gmx.net \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).