[Top][All Lists]

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

Re: Remove all indentation - how to?

From: Tim X
Subject: Re: Remove all indentation - how to?
Date: 09 Feb 2003 12:30:29 +1100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

>>>>> "Garry" == Garry  <> writes:

 Garry> Piet van Oostrum wrote:
 >>>>>>> Garry <> (G) wrote:
 G> Did it but to no avail. For example, if I press RET at the end of
 G> a line of HTML which began with an indented <td> Emacs
 G> automatically begins the next line beneath the previous tag. I
 G> don't want this.
 >> (local-set-key "\C-m" 'newline) in the html-mode that you use.

 Garry> I appended this to my html-helper-mode.el but Emacs still
 Garry> indents beneath the preceding tag.

I think you need to put the local-set-key in a load hook for
html-helper.el, not in html-helper.el itself. You want this value set
locally for buffers in html-helper-mode. Try something like

(add-hook 'html-helper-mode-hook (lambda ()
                                    (local-set-key "\C-m" 'newline)))

The objective of this above load hook is to change the definition of
RETURN from newline-and-indent to newline. Once you have added this
hook and start a new html file using html-helper-mode (not an existing
html-helper-mode buffer as the load hook only runs when the mode is
loaded), try C-h k <return> to see what is bound to the return key -
it should be just the function newline, not newline-and-indent..

If it is bound to just newline and you still find your code indenting
to the same level as the previous line etc - then its probably due to
one of the fill modes which you may also need to disable.


Tim Cross
The e-mail address on this message is FALSE (obviously!). My real e-mail is
to a company in Australia called rapttech and my login is tcross - if you 
really need to send mail, you should be able to work it out!

reply via email to

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