/*
- * Copyright (C) 1996-2000 Michael R. Elkins <me@cs.hmc.edu>, and others
+ * Copyright (C) 1996-2002 Michael R. Elkins <me@mutt.org>, and others
*
* 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
goto error;
}
- mutt_extract_token (&command, s, (data & (M_FOLDERHOOK | M_SENDHOOK | M_ACCOUNTHOOK)) ? M_TOKEN_SPACE : 0);
+ mutt_extract_token (&command, s, (data & (M_FOLDERHOOK | M_SENDHOOK | M_ACCOUNTHOOK | M_REPLYHOOK)) ? M_TOKEN_SPACE : 0);
if (!command.data)
{
ptr->rx.not == not &&
!mutt_strcmp (pattern.data, ptr->rx.pattern))
{
- if (data & (M_FOLDERHOOK | M_SENDHOOK | M_MESSAGEHOOK | M_ACCOUNTHOOK))
+ if (data & (M_FOLDERHOOK | M_SENDHOOK | M_MESSAGEHOOK | M_ACCOUNTHOOK | M_REPLYHOOK))
{
/* these hooks allow multiple commands with the same
* pattern, so if we've already seen this pattern/command pair, just
break;
}
- if (data & (M_SENDHOOK | M_SAVEHOOK | M_FCCHOOK | M_MESSAGEHOOK))
+ if (data & (M_SENDHOOK | M_SAVEHOOK | M_FCCHOOK | M_MESSAGEHOOK | M_REPLYHOOK))
{
if ((pat = mutt_pattern_comp (pattern.data,
- (data & (M_SENDHOOK | M_FCCHOOK)) ? 0 : M_FULL_MSG,
+ (data & (M_SENDHOOK | M_REPLYHOOK | M_FCCHOOK)) ? 0 : M_FULL_MSG,
err)) == NULL)
goto error;
}
/*
- * Copyright (C) 1996-2000 Michael R. Elkins <me@cs.hmc.edu>
+ * Copyright (C) 1996-2002 Michael R. Elkins <me@mutt.org>
*
* 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
{ "crypt-hook", mutt_parse_hook, M_CRYPTHOOK },
#endif /* HAVE_PGP */
{ "push", mutt_parse_push, 0 },
+ { "reply-hook", mutt_parse_hook, M_REPLYHOOK },
{ "reset", parse_set, M_SET_RESET },
{ "save-hook", mutt_parse_hook, M_SAVEHOOK },
{ "score", mutt_parse_score, 0 },
/*
- * Copyright (C) 1996-2000 Michael R. Elkins <me@cs.hmc.edu>
+ * Copyright (C) 1996-2002 Michael R. Elkins <me@mutt.org>
*
* 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
#define M_CRYPTHOOK (1<<8)
#endif
#define M_ACCOUNTHOOK (1<<9)
+#define M_REPLYHOOK (1<<10)
/* tree characters for linearize_tree and print_enriched_string */
#define M_TREE_LLCORNER 1
killfrom = 1;
}
+ if ((flags & SENDREPLY) && cur)
+ {
+ /* change setting based upon message we are replying to */
+ mutt_message_hook (NULL, cur, M_REPLYHOOK);
+
+ /*
+ * set the replied flag for the message we are generating so that the
+ * user can use ~Q in a send-hook to know when reply-hook's are also
+ * being used.
+ */
+ msg->replied = 1;
+ }
+
/* change settings based upon recipients */
mutt_message_hook (NULL, msg, M_SENDHOOK);