Commit 2d38d8f9 authored by Michael Elkins's avatar Michael Elkins

The following patch adds the `unalternative_order' command. It also

allows using "*" more generically in un-commands which use
parse_unlists().
parent 5f95840a
......@@ -2837,6 +2837,9 @@ Next, mutt will check if any of the types have a defined
that, Mutt will look for any text type. As a last attempt, mutt will
look for any type it knows how to handle.
To remove a MIME type from the <tt/alternative_order/ list, use the
<tt/unalternative_order/ command.
<sect1>MIME Lookup<label id="mime_lookup">
<p>
Mutt's mime&lowbar;lookup list specifies a list of mime-types that should not
......@@ -2917,6 +2920,8 @@ The following are the commands understood by mutt.
<item>
<tt><ref id="alternative_order" name="alternative&lowbar;order"></tt> <em/mimetype/ &lsqb; <em/mimetype/ ... &rsqb;
<item>
<tt><ref id="alternative_order" name="unalternative&lowbar;order"></tt> <em/mimetype/ &lsqb; <em/mimetype/ ... &rsqb;
<item>
<tt><ref id="auto_view" name="auto&lowbar;view"></tt> <em/mimetype/ &lsqb; <em/mimetype/ ... &rsqb;
<item>
<tt><ref id="auto_view" name="unauto&lowbar;view"></tt> <em/mimetype/ &lsqb; <em/mimetype/ ... &rsqb;
......
......@@ -405,6 +405,14 @@ static int parse_unlist (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err
do
{
mutt_extract_token (buf, s, 0);
/*
* Check for deletion of entire list
*/
if (mutt_strcmp (buf->data, "*") == 0)
{
mutt_free_list ((LIST **) data);
break;
}
remove_from_list ((LIST **) data, buf->data);
}
while (MoreArgs (s));
......
......@@ -2700,6 +2700,7 @@ struct command_t Commands[] = {
{ "subscribe", parse_subscribe, 0 },
{ "toggle", parse_set, M_SET_INV },
{ "unalias", parse_unalias, 0 },
{ "unalternative_order",parse_unlist, UL &AlternativeOrderList },
{ "unauto_view", parse_unlist, UL &AutoViewList },
{ "unhdr_order", parse_unlist, UL &HeaderOrderList },
{ "unhook", mutt_parse_unhook, 0 },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment