comp.lang.ada
 help / color / mirror / Atom feed
* Ada Mode indenting question
@ 2003-10-01  5:08 Jack
  2003-10-02 12:52 ` Emmanuel Briot
  0 siblings, 1 reply; 3+ messages in thread
From: Jack @ 2003-10-01  5:08 UTC (permalink / raw)


Hi,

I wouldn't ask this question here, but I know that AdaMode gurus prowl
this group:

Before I reinstalled it, my Emacs used to properly indent the next
line when I hit "return" - that is, when I finished a line and hit
"return", the cursor would be waiting at the proper indentation.

Now, it waits for me to press "tab". 

Poring through webpages and books, I've discovered that pressing "C-j"
instead of "return" gets me the desired behavior. Must Emacs train me,
or can I train Emacs? Is there a variable to set? Can I map "C-j" to
the "return" key?

Thanks, 
Jack



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Ada Mode indenting question
  2003-10-01  5:08 Ada Mode indenting question Jack
@ 2003-10-02 12:52 ` Emmanuel Briot
  2003-10-03  5:33   ` Jack
  0 siblings, 1 reply; 3+ messages in thread
From: Emmanuel Briot @ 2003-10-02 12:52 UTC (permalink / raw)
  To: Jack

On Tue, 30 Sep 2003 22:08:07 -0700, Jack wrote:

> Before I reinstalled it, my Emacs used to properly indent the next
> line when I hit "return" - that is, when I finished a line and hit
> "return", the cursor would be waiting at the proper indentation.

Add the following to your ~/.emacs file:

(global-set-key "\C-m" 'newline-and-indent)

regards,
Emmanuel



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Ada Mode indenting question
  2003-10-02 12:52 ` Emmanuel Briot
@ 2003-10-03  5:33   ` Jack
  0 siblings, 0 replies; 3+ messages in thread
From: Jack @ 2003-10-03  5:33 UTC (permalink / raw)


> Add the following to your ~/.emacs file:
> 
> (global-set-key "\C-m" 'newline-and-indent)


Thank you very much. Using your suggestion, I did some more research
and found that I wanted:

(global-set-key "\C-m" 'reindent-then-newline-and-indent)

It now works just the way I want.

Regards,
Jack



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-10-03  5:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-01  5:08 Ada Mode indenting question Jack
2003-10-02 12:52 ` Emmanuel Briot
2003-10-03  5:33   ` Jack

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox