Commit 7989acf6 authored by Kevin J. McCarthy's avatar Kevin J. McCarthy

Allow "unsubjectrc *" to remove all patterns.

Thanks to Aaron Schrab for the original patch.
parent 0663272c
......@@ -6098,9 +6098,14 @@ that either is reproduced elsewhere, or is of secondary interest.
</arg>
<command>unsubjectrx</command>
<group choice="req">
<arg choice="plain">
<replaceable class="parameter">*</replaceable>
</arg>
<arg choice="plain">
<replaceable class="parameter">pattern</replaceable>
</arg>
</group>
</cmdsynopsis>
<para>
......@@ -6121,8 +6126,9 @@ entire subject, not just the match!
</para>
<para>
<literal>unsubjectrx</literal> removes a given subjectrx from the substitution
list.
<literal>unsubjectrx</literal> removes a given subjectrx from the
substitution list. If <literal>*</literal> is used as the pattern,
all substitutions will be removed.
</para>
<example id="ex-subjectrx">
......@@ -10062,13 +10068,18 @@ The following are the commands understood by Mutt:
<replaceable class="parameter">pattern</replaceable>
</arg>
<arg choice="plain">
<replaceable class="parameter">format</replaceable>
<replaceable class="parameter">replacement</replaceable>
</arg>
<command><link linkend="display-munging">unsubjectrx</link></command>
<group choice="req">
<arg choice="plain">
<replaceable class="parameter">*</replaceable>
</arg>
<arg choice="plain">
<replaceable class="parameter">pattern</replaceable>
</arg>
</group>
</cmdsynopsis>
</listitem>
......
......@@ -801,6 +801,14 @@ static int parse_unreplace_list (BUFFER *buf, BUFFER *s, unsigned long data, BUF
}
mutt_extract_token(buf, s, 0);
/* "*" is a special case. */
if (!mutt_strcmp (buf->data, "*"))
{
mutt_free_replace_list (list);
return 0;
}
remove_from_replace_list(list, buf->data);
return 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