diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 1998-09-29 06:58:08 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 1998-09-29 06:58:08 +0000 |
commit | c2a49fbc2cd96af8a3eeb9eb383689dd94e0be30 (patch) | |
tree | 3ad09b9ec9a467f67eb9efd3267f48353b8a2867 /init.c | |
parent | 12cc52314fee4a83540896a9b81cec32ff808f7b (diff) |
Add caching for a message's flags.
Diffstat (limited to 'init.c')
-rw-r--r-- | init.c | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -806,6 +806,14 @@ static int parse_set (BUFFER *tmp, BUFFER *s, unsigned long data, BUFFER *err) break; } + if (option(OPTATTACHMSG) && (!strcmp(MuttVars[idx].option, "alternates") + || !strcmp(MuttVars[idx].option, "reply_regexp"))) + { + snprintf (err->data, err->dsize, "Operation not permitted when in attach-message mode."); + r = -1; + break; + } + s->dptr++; /* copy the value of the string */ @@ -853,7 +861,8 @@ static int parse_set (BUFFER *tmp, BUFFER *s, unsigned long data, BUFFER *err) ptr->rx = rx; ptr->not = not; - /* $reply_regexp requires special treatment */ + /* $reply_regexp and $alterantes require special treatment */ + if (Context && Context->msgcount && strcmp (MuttVars[idx].option, "reply_regexp") == 0) { @@ -873,6 +882,15 @@ static int parse_set (BUFFER *tmp, BUFFER *s, unsigned long data, BUFFER *err) } #undef CUR_ENV } + + if(Context && Context->msgcount && + strcmp(MuttVars[idx].option, "alternates") == 0) + { + int i; + + for(i = 0; i < Context->msgcount; i++) + Context->hdrs[i]->recip_valid = 0; + } } } else if (DTYPE(MuttVars[idx].type) == DT_MAGIC) |