This mr contains the missing parts of marco's changes in !10 (closed) that were not included into !11 (merged).
In addition to !11 (merged), it adds the following portions:
As noted in !11 (merged), I do not recommmend merging those. IRC-discussion indicates that for minted, the preferred option would be to include it, but only conditionally with an explicit toggle (default being: use lstlistings). Volunteers that want to implement this are welcome.
Thus this MR thus fully superseeds !6 (closed), !8 (closed), !9 (closed) and !10 (closed), and extends !11 (merged).