Merge branch 'stable'
automatic post-release commit for mutt-1.12.1
Update UPDATING file for 1.12.1 release.
Merge branch 'stable'
Add $fcc_before_send, defaulting unset.

When set, the message will be Fcc'ed the same as sent.  $fcc_clear and
$fcc_attach will be ignored.  This is because of the difficulty of
unwinding changes, notably Protected Headers, without potentially
breaking signatures.
Merge branch 'stable'
Improve $reverse_realname documentation.

Make it clear that, even if set, a missing realname part of the
matching address will be filled in by $realname.
Allow imap_cmd_finish() to both expunge and fetch new mail.

Since commit dd327606 changed check_status setting to use bit
operators, and imap_check_mailbox() can call imap_cmd_finish() twice,
there is no reason to delay the processing of new mail until a second

imap_read_headers() deals with msn_end < msg_begin, so remove
the (count > idata->max_msn) check.  This will allow the reopen flag
to be reset if somehow it's not the case.
Merge branch 'stable'
Mention sources for ~p and ~P patterns.

The manual only mentioned alternates.  Add $from and local
account/hostname to the list.

The man page implied the only source was alternates.  Change to the
same wording as the manual.

Thanks to @rear1019 for pointing out the misleading man page.
Merge branch 'stable'
Improve imap_append_message() error message handling.

If the rc is IMAP_CMD_BAD, then either idata->buf is stale or an error
message has already been printed (in cmd_handle_untagged()).

Use imap_next_word() to skip over the next two words instead of
directly skipping over SEQLEN, in case the buffer is in a different
format.  We don't want to jump over the end of string.

Skip the mutt_error() if there is nothing to print.
Merge branch 'stable'
Enable the idata->check_status using bit operations.

Commit e3f66d7e fixed dropped new mail notications, removing the
unsetting of idata->reopen IMAP_NEWMAIL_PENDING in imap_cmd_finish()
when an EXPUNGE was processed.

However, imap_cmd_finish() can be called twice by
imap_check_mailbox().  First as part of the imap_exec(), and manually
again just below.

Now that the IMAP_NEWMAIL_PENDING still exists, a second call could
overwrite idata->check_status if both reopen flags were set.

This unfortunately affects update_index(), which behaves differently

I need to change the return value of mx_check_mailbox() in master to
preserve all the bits, so the index can both notify of new mail and
update_index() properly.

For stable, the best fix is to use bit operators to enable the
check_status flags in imap_cmd_finish() (and cmd_parse_fetch for
flags), and keep the imap_check_mailbox() priority of setting its
return value (it prioritizes IMAP_EXCHANGE_PENDING).
Merge branch 'stable'
Improve robustness of imap_append_message().

First, check the imap_cmd_step() return value instead of looking at
idata->buf for "OK".  If the connection bombed and imap_cmd_step()
returned IMAP_CMD_BAD, the value of idata->buf is stale.

If the server returned "+ OK" for the command continuation request
response, the call to imap_code(idata->buf) would even end up
returning true, despite that the append failed!  (See #110, although
at the time of commit I can only hypothesize this is what is

Second, check the status of the writes.  flush_buffer() was not
passing the rc from mutt_socket_write_n(), which was further making
the above disaster scenerio possible.
Check for GNU Make to allow version.h FORCE target.

If we're using GNU Make, the FORCE target allows automatically
updating the version number after each commit.

See commit 22c6df82
Merge branch 'stable'
Fix dropped new mail notifications when an EXPUNGE_PENDING is set.

Prior to the fetch_headers rework and introduction of
idata->max_msn (starting around e0376c75), cmd_handle_untagged() was
looking directly at ctx->msgcount, which isn't fixed up until
imap_expunge_mailbox().  At that time, more care had to be taken
inbetween handling the EXPUNGE message and the actual expunge of the
mailbox because of the discrepency between server state and mailbox
context state.

idata->max_msn is now decremented during the processing of EXPUNGE and
VANISHED notices from the server, so reflect "current" state.  So,
when we receive an EXISTS notice, we no longer need the checks for
expunge state and can always set the NEWMAIL_PENDING flag.

Additionally, fix imap_cmd_finish() to retain the IMAP_NEWMAIL_PENDING
flag after handling an expunge.  The expunge does not grab new
messages so dropping the flag would cause mutt to forget the new mail
status until another EXISTS command.

Since this is a stable branch fix, I'm leaving the either/or
processing of expunge versus new mail in imap_cmd_finish().  However,
I don't see why this has to be done in two calls.  I may rework that
in master to process an expunge and then the new mail one after the
Change --disable-doc to only skip manual generation.

Instead of skipping the entire doc directory building, just skip the
manual.html, manual.txt, and generation.

Generate and install the other files in the doc directory, which don't
have the same involved dependencies as the DocBook generated files.