* Re: Remove all indentation - how to?
2003-02-07 21:15 Remove all indentation - how to? Garry
@ 2003-02-07 21:14 ` Edward O'Connor
2003-02-08 19:49 ` Garry
0 siblings, 1 reply; 7+ messages in thread
From: Edward O'Connor @ 2003-02-07 21:14 UTC (permalink / raw)
> The reason I want this simplicity is that I want my HTML to read
> exactly as I typed it within View Source, not according to a
> particular browser's default TAB width. The only way to achieve
> this is to eschew TABs in favour of spaces.
Adding (setq-default indent-tabs-mode nil) to your .emacs file
should do this.
Ted
--
Edward O'Connor
oconnor@soe.ucsd.edu
^ permalink raw reply [flat|nested] 7+ messages in thread
* Remove all indentation - how to?
@ 2003-02-07 21:15 Garry
2003-02-07 21:14 ` Edward O'Connor
0 siblings, 1 reply; 7+ messages in thread
From: Garry @ 2003-02-07 21:15 UTC (permalink / raw)
I'm a simple HTML monkey, not a die-hard C programmer :-)
All I want is for Emacs to do something really simple like start each
new line of my code from the left margin when I press RETURN, not
according to its default TAB criteria. I've had a good look through the
manual so, please, no RTFM. Can't find anything pertaining to removing
auto-indentation. I tried
('indent-tab-mode nil)
.... inside my custom variables section of .emacs but to no avail.
The reason I want this simplicity is that I want my HTML to read exactly
as I typed it within View Source, not according to a particular
browser's default TAB width. The only way to achieve this is to eschew
TABs in favour of spaces.
Garry Heaton
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Remove all indentation - how to?
2003-02-07 21:14 ` Edward O'Connor
@ 2003-02-08 19:49 ` Garry
2003-02-08 20:40 ` Piet van Oostrum
0 siblings, 1 reply; 7+ messages in thread
From: Garry @ 2003-02-08 19:49 UTC (permalink / raw)
Edward O'Connor wrote:
>>The reason I want this simplicity is that I want my HTML to read
>>exactly as I typed it within View Source, not according to a
>>particular browser's default TAB width. The only way to achieve
>>this is to eschew TABs in favour of spaces.
>
>
> Adding (setq-default indent-tabs-mode nil) to your .emacs file
> should do this.
>
>
> Ted
>
Did it but to no avail. For example, if I press RET at the end of a line
of HTML which began with an indented <td> Emacs automatically begins the
next line beneath the previous tag. I don't want this.
Garry
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Remove all indentation - how to?
2003-02-08 19:49 ` Garry
@ 2003-02-08 20:40 ` Piet van Oostrum
2003-02-08 21:17 ` Garry
0 siblings, 1 reply; 7+ messages in thread
From: Piet van Oostrum @ 2003-02-08 20:40 UTC (permalink / raw)
>>>>> Garry <none@none.com> (G) wrote:
G> Did it but to no avail. For example, if I press RET at the end of a line
G> of HTML which began with an indented <td> Emacs automatically begins the
G> next line beneath the previous tag. I don't want this.
(local-set-key "\C-m" 'newline) in the html-mode that you use.
--
Piet van Oostrum <piet@cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: P.van.Oostrum@hccnet.nl
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Remove all indentation - how to?
2003-02-08 20:40 ` Piet van Oostrum
@ 2003-02-08 21:17 ` Garry
2003-02-09 1:30 ` Tim X
0 siblings, 1 reply; 7+ messages in thread
From: Garry @ 2003-02-08 21:17 UTC (permalink / raw)
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 a line
> G> of HTML which began with an indented <td> Emacs automatically begins the
> G> next line beneath the previous tag. I don't want this.
>
> (local-set-key "\C-m" 'newline) in the html-mode that you use.
I appended this to my html-helper-mode.el but Emacs still indents
beneath the preceding tag.
My .emacs file can be viewed at:
www.usableit.co.uk/emacs.txt
Garry
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Remove all indentation - how to?
2003-02-08 21:17 ` Garry
@ 2003-02-09 1:30 ` Tim X
2003-02-09 22:01 ` Garry
0 siblings, 1 reply; 7+ messages in thread
From: Tim X @ 2003-02-09 1:30 UTC (permalink / raw)
>>>>> "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 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!
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Remove all indentation - how to?
2003-02-09 1:30 ` Tim X
@ 2003-02-09 22:01 ` Garry
0 siblings, 0 replies; 7+ messages in thread
From: Garry @ 2003-02-09 22:01 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2003-02-09 22:01 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-07 21:15 Remove all indentation - how to? Garry
2003-02-07 21:14 ` Edward O'Connor
2003-02-08 19:49 ` Garry
2003-02-08 20:40 ` Piet van Oostrum
2003-02-08 21:17 ` Garry
2003-02-09 1:30 ` Tim X
2003-02-09 22:01 ` Garry
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.