From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: [arensb@ooblick.com: Feature suggestion: split-line] Date: 03 Jan 2003 10:43:50 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <5x7kdmk1pk.fsf@kfs2.cua.dk> References: <200301022333.h02NXR0v001405@beta.mvs.co.il> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1041584524 27901 80.91.224.249 (3 Jan 2003 09:02:04 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 3 Jan 2003 09:02:04 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18UNiL-0007Fb-00 for ; Fri, 03 Jan 2003 10:02:01 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18UNks-0006QF-00 for ; Fri, 03 Jan 2003 10:04:38 +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 18UNfu-0003dy-01 for emacs-devel@quimby.gnus.org; Fri, 03 Jan 2003 03:59:30 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18UNRO-0007M5-00 for emacs-devel@gnu.org; Fri, 03 Jan 2003 03:44:30 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18UNRK-0007Lq-00 for emacs-devel@gnu.org; Fri, 03 Jan 2003 03:44:29 -0500 Original-Received: from mail.filanet.dk ([195.215.206.179]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18UNRK-0007DQ-00; Fri, 03 Jan 2003 03:44:26 -0500 Original-Received: from kfs2.cua.dk.cua.dk (kfs2.local.filanet.dk [192.168.1.182]) by mail.filanet.dk (Postfix) with SMTP id A1B7C7C017; Fri, 3 Jan 2003 09:44:19 +0100 (CET) Original-To: ehud@unix.mvs.co.il In-Reply-To: <200301022333.h02NXR0v001405@beta.mvs.co.il> Original-Lines: 50 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Original-cc: rms@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:10430 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:10430 "Ehud Karni" writes: > On Thu, 02 Jan 2003 13:38:26 -0500, Richard Stallman wrote: > > > > > The quick > > > brown fox > > instead of > > > The quick > > brown fox > > Since `delete-indentation' (aka join-line) is deleting `fill-prefix', > it is reasonable that `split-line' should add it. `delete-indentation' > checks for the `fill-prefix' existence. I think `split-line' should > check it too, i.e. Add IT ONLY IF the current line HAS IT. I like that! In message buffers, I'd rather like it to insert message-yank-prefix with the same semantics! But I guess a message-split-line would be better for that; and [remap split-line] to it in the message-mode-map. Something like this: (defun message-split-line () "Split current line, moving portion beyond point vertically down. If fill-prefix is set and the current line has it, put it on the new line" (interactive "*") (skip-chars-forward " \t") (let ((col (current-column)) (pos (point)) (prfx (and message-yank-prefix (string= message-yank-prefix (buffer-substring (line-beginning-position) (+ (line-beginning-position) (length message-yank-prefix))))))) (newline 1) (if prfx (insert-and-inherit message-yank-prefix)) (indent-to col 0) (goto-char pos))) > BTW. I would have changed the behavior of `open-line' to the same > logic, i.e. - Add fill-prefix if the current line has it (instead > of its current behavior - adding it only when you are at bolp). I'd second that too. -- Kim F. Storm http://www.cua.dk