[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Remove all indentation - how to?
From: |
Garry |
Subject: |
Re: Remove all indentation - how to? |
Date: |
Sun, 09 Feb 2003 22:01:21 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826 |
Tim X wrote:
>>>>>>"Garry" == Garry <none@none.com> writes:
>>>>>
>
> Garry> Piet van Oostrum wrote:
> >>>>>>> Garry <none@none.com> (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
>
Tim, you're a genius. Now I can grow my hair back :-)
Garry