From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: kai.grossjohann@gmx.net (=?iso-8859-1?q?Kai_Gro=DFjohann?=) Newsgroups: gmane.emacs.help Subject: Re: simple editor required Date: Fri, 20 Jun 2003 16:40:50 +0200 Organization: University of Duisburg, Germany Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <84wufgke19.fsf@lucy.is.informatik.uni-duisburg.de> References: <8465nduadj.fsf@lucy.is.informatik.uni-duisburg.de> <5lfzmgbrio.fsf@rum.cs.yale.edu> <84el1zcze6.fsf@lucy.is.informatik.uni-duisburg.de> <841xxzto54.fsf@lucy.is.informatik.uni-duisburg.de> <5lu1aqcev2.fsf@rum.cs.yale.edu> <84n0git5vn.fsf@lucy.is.informatik.uni-duisburg.de> <844r2opsuy.fsf@lucy.is.informatik.uni-duisburg.de> <84r85ry9ft.fsf@lucy.is.informatik.uni-duisburg.de> <84vfv2ulf7.fsf@lucy.is.informatik.uni-duisburg.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1056120506 23942 80.91.224.249 (20 Jun 2003 14:48:26 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 20 Jun 2003 14:48:26 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Fri Jun 20 16:48:25 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 19TNAN-00068B-00 for ; Fri, 20 Jun 2003 16:47:03 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19TN93-0008GF-7y for gnu-help-gnu-emacs@m.gmane.org; Fri, 20 Jun 2003 10:45:41 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!lucy.is.informatik.uni-duisburg.DE!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 29 Original-NNTP-Posting-Host: lucy.is.informatik.uni-duisburg.de (134.91.35.216) Original-X-Trace: fu-berlin.de 1056120088 24378541 134.91.35.216 (16 [73968]) Mail-Copies-To: never User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:T37mpxTFc0+RcWgNiJ514YIT54E= Original-Xref: shelby.stanford.edu gnu.emacs.help:114604 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:11096 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:11096 "Paul Edwards" writes: > If I am at the beginning of the "cccc" line and I hit enter, > emacs is inspired to indent cccc to be under bbbb. I don't > want that, I want cccc to stay where it is. If I wanted cccc > to be indented I would do something, e.g. press tab or hit > spaces. Okay, so if the previous line exists and is not blank, then indent the new line to the previous line after RET. Yeah, I'm afraid you'll have to write your own indentation function. Maybe this one? (defun pe-indent-relative () "Like `indent-relative' but don't indent after blank line." (when (save-excursion (and (zerop (forward-line -1)) (not (looking-at "\s-*$")))) (indent-relative-maybe))) (defun pe-text-setup () (setq indent-line-function 'pe-indent-relative)) (add-hook 'text-mode-hook 'pe-text-setup) Maybe it works, but I haven't tested it. -- This line is not blank.