From 129050c6742f6be13fa5635ba03542b7fb2a9525 Mon Sep 17 00:00:00 2001 From: Pierre Habouzit Date: Mon, 27 Nov 2006 00:27:43 +0100 Subject: [PATCH] remove a mutt-ng thing that makes no sense at all. rework OPTWEED handling a bit. Signed-off-by: Pierre Habouzit --- init.h | 12 ------------ lib-mime/rfc822parse.c | 5 +---- lib-ui/hdrline.c | 6 ------ mutt.h | 1 - send.c | 2 +- 5 files changed, 2 insertions(+), 24 deletions(-) diff --git a/init.h b/init.h index a61c4af..9895751 100644 --- a/init.h +++ b/init.h @@ -390,18 +390,6 @@ struct option_t MuttVars[] = { ** When \fIunset\fP, Madmutt will not collapse a thread if it contains any ** unread messages. */ - {"count_attachments", DT_BOOL, R_NONE, OPTCOUNTATTACH, "yes"}, - /* - ** .pp - ** This variable controls whether attachments should be counted for $$$index_format - ** and its \fT%X\fP expando or not. As for scoring, this variable can be used to - ** selectively turn counting on or off instead of removing and re-adding rules as - ** prefered because counting requires full loading of messages. - ** .pp - ** If it is \fIset\fP and rules were defined via the \fTattachments\fP and/or - ** \fTunattachments\fP commands, counting will be done. If it is \fIunset\fP no - ** counting will be done regardless whether rules were defined or not. - */ {"uncollapse_jump", DT_BOOL, R_NONE, OPTUNCOLLAPSEJUMP, "no" }, /* ** .pp diff --git a/lib-mime/rfc822parse.c b/lib-mime/rfc822parse.c index 9c43c9d..1bafc6b 100644 --- a/lib-mime/rfc822parse.c +++ b/lib-mime/rfc822parse.c @@ -957,7 +957,7 @@ string_list_t **mutt_parse_rfc822_line(ENVELOPE *e, HEADER *hdr, char *line, cha /* restore the original line */ line[m_strlen(line)] = ':'; - if (weed && option(OPTWEED) && mutt_matches_ignore(line, Ignore) + if (weed && mutt_matches_ignore(line, Ignore) && !mutt_matches_ignore(line, UnIgnore)) { break; } @@ -1147,9 +1147,6 @@ static int count_body_parts (BODY *body, int flags) int mutt_count_body_parts(HEADER *hdr, int flags) { - if (!option(OPTCOUNTATTACH)) - return 0; - if (hdr->attach_valid && !(flags & M_PARTS_RECOUNT)) return hdr->attach_total; diff --git a/lib-ui/hdrline.c b/lib-ui/hdrline.c index 883c9cb..fa3a28d 100644 --- a/lib-ui/hdrline.c +++ b/lib-ui/hdrline.c @@ -628,12 +628,6 @@ static const char *hdr_format_str (char *dest, { int count = 0; - if (option (OPTCOUNTATTACH)) { - if (!hdr->content->parts) - mutt_parse_mime_message(ctx, hdr); - count = mutt_count_body_parts(hdr, 0); - } - /* The recursion allows messages without depth to return 0. */ if (optional) optional = count != 0; diff --git a/mutt.h b/mutt.h index 5036a5f..d43cab7 100644 --- a/mutt.h +++ b/mutt.h @@ -252,7 +252,6 @@ enum { OPTCOLLAPSEUNREAD, OPTCONFIRMAPPEND, OPTCONFIRMCREATE, - OPTCOUNTATTACH, OPTDELETEUNTAG, OPTDELSP, OPTDIGESTCOLLAPSE, diff --git a/send.c b/send.c index 6bd7885..e2666a2 100644 --- a/send.c +++ b/send.c @@ -1043,7 +1043,7 @@ int mutt_resend_message (FILE * fp, CONTEXT * ctx, HEADER * cur) { HEADER *msg = header_new(); - if (mutt_prepare_template (fp, ctx, msg, cur, 1) < 0) + if (mutt_prepare_template (fp, ctx, msg, cur, option(OPTWEED)) < 0) return -1; return ci_send_message (SENDRESEND, msg, NULL, ctx, cur); -- 2.20.1