help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Auto-indent new lines?


From: Mark Newby
Subject: Re: Auto-indent new lines?
Date: Fri, 2 Mar 2001 11:34:13 -0000

Thanks for trying to help, but it hasn't changed its behaviour at all.  I've
added the lines you gave me to /home/mark/.emacs and logged in as mark,
fired up emacs with a .txt file and it still doesn't auto indent new lines
to the indentation of the current line when I hit RET.  I've even tried
setting the mode to html with M-x html-mode --all that does is turn off the
TAB key --very unhelpful behaviour if you ask me.  I can't find a
/root/.emacs, but guess it's the /etc/skel/.emacs, but that doesn't work
either.

Why are these basic necessities just not supported, let alone default
behaviour?  I've written code in Windows for many years and all editors/IDEs
I've ever used auto indent new lines.  So much for the transition to the
Unix/Linux world where I was told the editors are so much better for writing
code in!

Are all the Unix editors like this?  I just can't understand it --am I
missing something?  Surely this can't be right...


Mark


----- Original Message -----
From: "G Annamalai" <gannam@india.dharma.com>
To: "Mark Newby" <mark.newby@ntlworld.com>
Cc: <help-gnu-emacs@gnu.org>
Sent: Friday, March 02, 2001 6:05 AM
Subject: Re: Auto-indent new lines?


> "Mark Newby" <mark.newby@ntlworld.com> writes:
>
> > How can I make Emacs and/or XEmacs on Win32 automatically indent new
lines
> > to that of the current line?
>
> auto-newline minor mode of CC Mode would do that for you.
>
> Add this to your .emacs file
>
> (add-hook 'c-mode-common-hook
>    '(lambda () (c-toggle-auto-hungry-state 1)))
>
> and you would get what you want.
>
> This hungry state turns on auto-newline and the hungry-delete minor
> modes.
>
> I would suggest you to read the info pages for "CC Mode".  There are
> a lot of customisations that you could do.
>
> Cheers,
> anna
> --
>
> If it wasn't for C, we'd be using BASI, PASAL and OBOL.
>
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]