From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Benjamin Rutt Newsgroups: gmane.emacs.help Subject: Re: 'smart' indentation Date: Sun, 09 Mar 2003 19:26:54 -0500 Organization: The Ohio State University Dept. of Computer and Info. Science Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <87llzonnqs.fsf@cecilia.trollope.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1047256224 28126 80.91.224.249 (10 Mar 2003 00:30:24 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 10 Mar 2003 00:30:24 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Mon Mar 10 01:30:18 2003 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 18sBBK-0007JH-00 for ; Mon, 10 Mar 2003 01:30:18 +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 18sBBj-0003FN-01 for gnu-help-gnu-emacs@m.gmane.org; Sun, 09 Mar 2003 19:30:43 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.ems.psu.edu!news.cis.ohio-state.edu!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 16 Original-NNTP-Posting-Host: gamma.cis.ohio-state.edu Mail-Copies-To: nobody User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (sparc-sun-solaris2.8) Cancel-Lock: sha1:nO4qZfNr4C+50Las7HaoW5g/6iM= Original-Xref: shelby.stanford.edu gnu.emacs.help:110939 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:7440 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:7440 Michael Powe writes: > hello, > > i would like to have 'smart' indentation, à la some editors i use like > textpad. if i indent a line, then when i press enter at the end of > the line, i want point to go to the indented position on the following > line. i can't find the way to make this work. it looks like > 'adaptive-fill-mode' should do this, but it does not. having to go > back and 'indent-region' is annoying. I think you want (global-set-key (kbd "RET") 'newline-and-indent) -- Benjamin