Add *on-compose-{enter,leave}* hooks (Jens Schleusener, Rudolf Sykora)..
commitd6902e1dce48ce07b5b336f9c1f280dc1d29c407
authorSteffen (Daode) Nurpmeso <steffen@sdaoden.eu>
Tue, 3 May 2016 14:25:05 +0000 (3 16:25 +0200)
committerSteffen (Daode) Nurpmeso <steffen@sdaoden.eu>
Thu, 15 Sep 2016 13:57:13 +0000 (15 15:57 +0200)
tree1e42d5ac4a5a186d255d40774170d5535972da28
parent983d22f925d46fcaa58c0e4c88d0240d9f161628
Add *on-compose-{enter,leave}* hooks (Jens Schleusener, Rudolf Sykora)..

It is a bit of a hack but offering pre- and post-compose hooks is
the only option we have to allow users to create a temporary
environment based on an actual message, like setting head or tail
injections, or do something like Rudolf's

  is it possible, when using S/MIME, to sign the mail
  only sometimes? (Mostly, it is redundant, only
  sometimes it's really wanted.)

Indeed Jens Schleusener (Jens dot Schleusener at t-online dot de)
suggested a mechanism that can be used to react upon target
addresses etc.  Though we are far off being really there (e.g.,
like sending the mail directly through different paths or so, if
we EVER get there).

No chance to do something about the body content, but offer new
temporary variables *compose-{from,sender,to,cc,bcc,subject}* in
some kind of string form and hope people can do something with it.

These macros run with `localopts' enabled by default, and any
changes stack up and will be unrolled once the message is sent.

Interestingly this required reordering and outsourcing of a lot of
things from sendout.c to collect.c, and it must be said that it
smells as if it belongs.

It is likely that the entire mechanism will be dropped again, and
completely replaced with something in TODO (some kind of
`onevent'), but that will take years.
accmacvar.c
collect.c
head.c
lex.c
nail.1
nail.h
nailfuns.h
nam_a_grp.c
sendout.c