From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Tim X Newsgroups: gmane.emacs.help Subject: Re: Remove all indentation - how to? Date: 09 Feb 2003 12:30:29 +1100 Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87fzqy9r62.fsf@tiger.rapttech.com.au> References: Reply-To: timx@spamto.devnul.com NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1044753579 21801 80.91.224.249 (9 Feb 2003 01:19:39 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 9 Feb 2003 01:19:39 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18hg89-0005fK-00 for ; Sun, 09 Feb 2003 02:19:37 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18hg8r-0007TX-05 for gnu-help-gnu-emacs@m.gmane.org; Sat, 08 Feb 2003 20:20:21 -0500 Original-Newsgroups: gnu.emacs.help Original-Lines: 41 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Original-NNTP-Posting-Host: ppp1701.nsw.padsl.internode.on.net Original-X-Trace: duster.adelaide.on.net 1044753543 ppp1701.nsw.padsl.internode.on.net (9 Feb 2003 11:49:03 +1050) Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.mel.connect.com.au!news.ade.connect.com.au!duster.adelaide.on.net!not-for-mail Original-Xref: shelby.stanford.edu gnu.emacs.help:109965 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:6470 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:6470 >>>>> "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 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 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!