From f65ee628d14f6d9fbe7a733ba7e68cc78c340697 Mon Sep 17 00:00:00 2001 From: Michael Elkins Date: Mon, 9 Sep 2002 20:09:52 +0000 Subject: [PATCH] Introduce $content_type. There's one change against Michael's patch, in how the "format=flowed" parameter is used. --- globals.h | 3 ++- init.h | 5 +++++ send.c | 5 ++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/globals.h b/globals.h index a654686a..d4d8f92a 100644 --- a/globals.h +++ b/globals.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 1996-2000 Michael R. Elkins + * Copyright (C) 1996-2002 Michael R. Elkins * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -37,6 +37,7 @@ WHERE char *Attribution; WHERE char *AttachFormat; WHERE char *Charset; WHERE char *ComposeFormat; +WHERE char *ContentType; WHERE char *DefaultHook; WHERE char *DateFmt; WHERE char *DisplayFilter; diff --git a/init.h b/init.h index 30970ec1..aacc98d5 100644 --- a/init.h +++ b/init.h @@ -343,6 +343,11 @@ struct option_t MuttVars[] = { ** many seconds if the connection is not able to be established. A negative ** value causes Mutt to wait indefinitely for the connection to succeed. */ + { "content_type", DT_STR, R_NONE, UL &ContentType, UL "text/plain" }, + /* + ** .pp + ** Sets the default Content-Type for the body of newly composed messages. + */ { "copy", DT_QUAD, R_NONE, OPT_COPY, M_YES }, /* ** .pp diff --git a/send.c b/send.c index f44aebb0..8c315d2a 100644 --- a/send.c +++ b/send.c @@ -1102,12 +1102,11 @@ ci_send_message (int flags, /* send mode */ pbody->next = msg->content; /* don't kill command-line attachments */ msg->content = pbody; - msg->content->type = TYPETEXT; - msg->content->subtype = safe_strdup ("plain"); + mutt_parse_content_type (ContentType, msg->content); msg->content->unlink = 1; msg->content->use_disp = 0; msg->content->disposition = DISPINLINE; - if (option (OPTTEXTFLOWED)) + if (option (OPTTEXTFLOWED) && msg->content->type == TYPETEXT && !ascii_strcasecmp (msg->content->subtype, "plain")) mutt_set_parameter ("format", "flowed", &msg->content->parameter); if (!tempfile) -- 2.40.0