mlf176f2/auto-indent-mode.el — pull request #12 by aecay (2013-03-09 18:19:05+00:00)
Title: Fix problem with minibuffer commands.

When executing the pre-command hook, (minibufferp) is not yet t; in
post-command-hook it is no longer t. This means that typing e.g. M-x
ignore RET will cause the current line to be reindented, because
post-command-hook thinks that the last command was (non-minibuffer)
return. Thus, we should set
auto-indent-last-pre-command-hook-minibufferp whenever the minibuffer is
entered, and not just in the pre-command hook.

One can observe this issue by opening a buffer with auto-indent-mode on,
changing the indentation of a line to be incorrect, then running M-x
ignore; the line should reindent. In practice, this is an issue for
python code like the following:

if condition:
do_something()

something_else()

Executing a minibuffer command with point on the something_else line
will cause that line to be indented into the conditional.