Gnus development mailing list
 help / color / mirror / Atom feed
From: Simon Josefsson <jas@extundo.com>
Cc: ding@gnus.org
Subject: Re: Followup leaves one space too many
Date: Mon, 01 Oct 2001 22:37:58 +0200	[thread overview]
Message-ID: <iluofnr5c61.fsf@barbar.josefsson.org> (raw)
In-Reply-To: <vaf1ykntqmm.fsf@INBOX.auto.gnus.tok.lucy.cs.uni-dortmund.de> (Kai.Grossjohann@CS.Uni-Dortmund.DE's message of "Mon, 01 Oct 2001 15:51:45 +0200")

Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> When I followup to something like the following:
>
> /----
> | > > foo
> | > > bar
> \----
>
> Then I get
>
> /----
> | > > > foo
> | >> > bar
> \----
>
> Note that the first line has "> > >" rather than ">> >".  I think the
> first line should have ">> >", like all the subsequent lines.

Yes, this is a side effect of the AI added as a result of the
<vafu1zmu3hm.fsf@INBOX.auto.gnus.tok.lucy.cs.uni-dortmund.de> thread,
also see the followup-thread <iluwv4faiaw.fsf@barbar.josefsson.org>.

I think the patch I proposed works equally well in practice, and gives
less surprising results in the corner cases.  Maybe you can run with
this for a while and see if it works?  (The patch is againt current
CVS.)

--- message.el.~6.119.~	Sun Sep 30 12:21:44 2001
+++ message.el	Mon Oct  1 22:34:48 2001
@@ -2105,31 +2105,11 @@
 	(indent-rigidly start (mark t) message-indentation-spaces)
       (save-excursion
 	(goto-char start)
-	(let (last-line)
-	  ;; `last-line' describes the contents of the last line
-	  ;; encountered in the loop below. nil means "empty line",
-	  ;; spaces "line consisting entirely of whitespace",
-	  ;; right-angle "line starts with >", quoted "quote character
-	  ;; at the beginning of the line", text "the remaining cases".
 	  (while (< (point) (mark t))
-	    (cond
-	     ((eolp) 
+	  (if (looking-at ">")
 	      (insert message-yank-cited-prefix)
-	      (setq last-line nil))
-	     ((looking-at ">")
-	      (if (memq last-line '(nil spaces right-angle quoted))
-		  (progn
-		    (insert message-yank-cited-prefix)
-		    (setq last-line 'quoted))
-		(insert message-yank-prefix)
-		(setq last-line 'right-angle)))
-	     ((looking-at "\\s-+$")
-	      (insert message-yank-prefix)
-	      (setq last-line 'spaces))
-	     (t
-	      (insert message-yank-prefix)
-	      (setq last-line 'text)))
-	    (forward-line 1)))))
+ 	    (insert message-yank-prefix))
+ 	  (forward-line 1))))
     (goto-char start)))
 
 (defun message-yank-original (&optional arg)




  parent reply	other threads:[~2001-10-01 20:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-01 13:51 Kai Großjohann
2001-10-01 20:12 ` Harry Putnam
2001-10-01 20:30   ` Paul Jarc
2001-10-01 22:21     ` Kai Großjohann
2001-10-01 22:24     ` Kai Großjohann
2001-10-01 20:37 ` Simon Josefsson [this message]
2001-10-01 22:26   ` Kai Großjohann
2001-10-02 17:04     ` Simon Josefsson
2001-10-02 21:30       ` Kai Großjohann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=iluofnr5c61.fsf@barbar.josefsson.org \
    --to=jas@extundo.com \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).