From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Garry Newsgroups: gmane.emacs.help Subject: Re: Remove all indentation - how to? Date: Sun, 09 Feb 2003 22:01:21 +0000 Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <87fzqy9r62.fsf@tiger.rapttech.com.au> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1044827932 18855 80.91.224.249 (9 Feb 2003 21:58:52 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 9 Feb 2003 21:58:52 +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 18hzTO-0004tv-00 for ; Sun, 09 Feb 2003 22:58:50 +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 18hzV6-0000xM-02 for gnu-help-gnu-emacs@m.gmane.org; Sun, 09 Feb 2003 17:00:36 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!diablo.theplanet.net!news.theplanet.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 43 Original-NNTP-Posting-Host: 217.134.69.132 Original-X-Trace: newsg1.svr.pol.co.uk 1044827833 7313 217.134.69.132 (9 Feb 2003 21:57:13 GMT) Original-NNTP-Posting-Date: 9 Feb 2003 21:57:13 GMT Original-X-Complaints-To: abuse@theplanet.net User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: en, en-us Original-Xref: shelby.stanford.edu gnu.emacs.help:109996 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:6501 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:6501 Tim X wrote: >>>>>>"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, you're a genius. Now I can grow my hair back :-) Garry