Re: [PATCH] Make f=f handler behave like old f=f handler for
Pushed, thanks. But I do miss the space stuffing :)
On Tuesday, 20 March 2007 at 13:00, Rocco Rutte wrote:
> Now lines containing quote characters but no further content appear as
> quoted lines again for making replies. Also, the spaces between quotes
> and text are removed to make output look as it did for the old handler.
> As it seems that most people want at least the old behavior back, here
> we go...
>
> As I didn't use the old f=f handler in mutt, the patch now restores the
> behavior to what I think the old one did. Note that people may need the
> stuff_all_quoted patch from Gary Johnson to transform '>text' style
> into '> text' style (again).
>
> rfc3676.c | 28 ++++++++--------------------
> 1 files changed, 8 insertions(+), 20 deletions(-)
>
> diff --git a/rfc3676.c b/rfc3676.c
> index 6a6a7da..78849c3 100644
> +++ b/rfc3676.c
> @@ -53,20 +53,14 @@ static int get_quote_level (const char *line)
> return quoted;
> }
>
> -static void print_empty_line (int ql, STATE *s)
> +static void print_indent (int ql, STATE *s)
> {
> int i;
>
> - if (!(s->flags & M_REPLYING))
> - {
> - if (s->prefix)
> - state_puts (s->prefix, s);
> - for (i = 0; i < ql; i++)
> - state_putc ('>', s);
> - if (!(s->flags & M_REPLYING))
> - state_putc (' ', s);
> - }
> - state_putc ('\n', s);
> + if (s->prefix)
> + state_puts (s->prefix, s);
> + for (i = 0; i < ql; i++)
> + state_putc ('>', s);
> }
>
> static void print_flowed_line (const char *line, STATE *s, int ql)
> @@ -74,7 +68,6 @@ static void print_flowed_line (const char *line, STATE *s,
> int ql)
> int width;
> char *pos, *oldpos;
> int len = mutt_strlen (line);
> - int i;
>
> width = (Wrap ? mutt_term_width (Wrap) : FLOWED_MAX) - ql - 1;
>
> @@ -85,7 +78,8 @@ static void print_flowed_line (const char *line, STATE *s,
> int ql)
>
> if (len == 0)
> {
> - print_empty_line (ql, s);
> + print_indent (ql, s);
> + state_putc ('\n', s);
> return;
> }
>
> @@ -134,13 +128,7 @@ static void print_flowed_line (const char *line, STATE
> *s, int ql)
> dprint (4, (debugfile, "f=f: line completely fits on screen\n"));
> }
>
> - if (s->prefix)
> - state_puts (s->prefix, s);
> -
> - for (i = 0; i < ql; ++i)
> - state_putc ('>', s);
> - if (!(s->flags & M_REPLYING) && (ql > 0 || s->prefix))
> - state_putc (' ', s);
> + print_indent (ql, s);
> state_puts (oldpos, s);
>
> if (pos < line + len)