From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/36589 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: `C-c C-v' should keep citation prefix Date: 05 Jun 2001 20:37:13 +0200 Message-ID: References: <87lmn7ssbl.fsf@lux.speakeasy.org> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035172149 9366 80.91.224.250 (21 Oct 2002 03:49:09 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 03:49:09 +0000 (UTC) Cc: ding@gnus.org Return-Path: Return-Path: Original-Received: (qmail 8098 invoked from network); 5 Jun 2001 18:36:24 -0000 Original-Received: from dolk.extundo.com (195.42.214.242) by gnus.org with SMTP; 5 Jun 2001 18:36:24 -0000 Original-Received: from barbar.josefsson.org (slipsten.extundo.com [195.42.214.241]) (authenticated) by dolk.extundo.com (8.11.3/8.11.3) with ESMTP id f55IaTq30056; Tue, 5 Jun 2001 20:36:30 +0200 Original-To: "Steven E. Harris" In-Reply-To: <87lmn7ssbl.fsf@lux.speakeasy.org> ("Steven E. Harris"'s message of "04 Jun 2001 17:06:54 -0700") Mail-Copies-To: nobody User-Agent: Gnus/5.090004 (Oort Gnus v0.04) XEmacs/21.4 (Academic Rigor) Original-Lines: 41 Xref: main.gmane.org gmane.emacs.gnus.general:36589 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:36589 "Steven E. Harris" writes: >> I think it would be a good idea if C-c C-v would keep it. > > I agree wholeheartedly. In fact, while quoting the line above, I had > to add the '>' to the beginning of the line after using C-c C-v. Does this do anything useful? Index: message.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/message.el,v retrieving revision 6.83 diff -u -u -w -r6.83 message.el --- message.el 2001/05/26 09:25:13 6.83 +++ message.el 2001/06/05 18:35:51 @@ -1786,7 +1786,13 @@ (defun message-delete-not-region (beg end) "Delete everything in the body of the current message outside of the region." (interactive "r") + (let (citeprefix) (save-excursion + (goto-char beg) + ;; snarf citation prefix, if appropriate + (unless (eq (point) (progn (beginning-of-line) (point))) + (when (looking-at message-cite-prefix-regexp) + (setq citeprefix (match-string 0)))) (goto-char end) (delete-region (point) (if (not (message-goto-signature)) (point) @@ -1796,7 +1802,9 @@ (goto-char beg) (delete-region beg (progn (message-goto-body) (forward-line 2) - (point)))) + (point))) + (when citeprefix + (insert citeprefix)))) (when (message-goto-signature) (forward-line -2)))