magit/magit — pull request #528 by tarsius (2013-01-09 19:29:48+00:00)
Title: refactor magit-section-case and related functions

`magit-section-case' used to return t if a clause succeeds but the
value of it's body is nil. This was due to internal needs; it allowed
`run-hook-with-args-until-sucess' to detect that a clause and therefor
the hook function succeeded. However, while it was documented in the
doc-string, callers should not have to deal with this.

* `magit-section-case' and `magit-section-action' always return
the value of the BODY now. In other words they can return nil.
* `magit-section-case' doesn't need to know about OPCODE.
Running the OPCODE hook is done in `magit-section-action' now.
* `magit-add-section' wrap each BODY so that `magit-section-action'
can detect whether a CLAUSE succeeded. Previously that was done
in `magit-section-case' for *any* CLAUSE.
* Disallow a t/otherwise CLAUSE in `magit-section-action' as that
would prevent the OPCODE hook from running.
* Replace uses of `magit-section-action' without OPCODE to use
`magit-section-case' instead.
* Properly document functions.
* New function `magit-section-match'.
* Prettify some related functions.